$plugins
$plugins :array<mixed,\FAA\Interfaces\Plugin>
The plugin buffer
$plugins :array<mixed,\FAA\Interfaces\Plugin>
The plugin buffer
$context :null|\FAA\Obj\Request|\FAA\Obj\CronJob
Storage for current global context
KnownPlugins(): array<mixed,\FAA\Interfaces\Plugin>
Get the known plugins
Context(null $context = null): void|null|\FAA\Obj\Request|\FAA\Obj\CronJob
Get/Set the global context
null | $context |
CallHook(string $name, $returns = false, $parameter = null): boolean
Call hook
Calls the interfaces and plugins that are registered on this hook
OnClearAllCache Called when all system caches are cleared at once, has no given argument
OnIndex Called in search index cron job. Has a reference to the job and the list of indexed elements. $parameter contains the content type (ct), the list of changes (list) and the name of the plugin (handler)
OnNewIndex Called in Cache::RecreateIndex with list of files inside the storage folder.
OnSyncronize Called on sync. Gets the list of changed files based on the history buffer. Arguments are similar to OnNewIndex.
RequestOnUrlParsed Called in request constructor, can be used to modify the request itself and the parsed url. Has a reference to the request and the parsed url
OnGetEntityAttributes Called in entity attribute loader. Can be used to modify the whole entity object e.g. add custom fields or tabs.
OnLoadEntityFormPreset Called when using the widget method to get a content type preset. Call is Widget::loadEntityFormPreset $returns is the parsed content type object with resolved attributes.
OnRegisterWidgetIncludes Called on TemplateEngine::renderExtension. Gets as argument the includes list in $param->returns
OnBasketLoadFieldPresetStatus Called in Basket::LoadFieldPresetStatus. Gets as argument the list of available status switches in $param->returns These include a label, value and a set of fields
OnDeleteContent Called in BaseContent when successfully deleted. Gets a reference to the status object and the deleted object. State is referenced in $returns, the deleted object in $parameter
OnAddOrUpdateContent Called in BaseContent when successfully updated or, created. Gets a reference to the status object and the object. State is referenced in $returns, the changed object in $parameter
OnBeforeAddOrUpdateContent Called in base content right before the saver operation State is referenced in $returns, the changed object in $parameter
OnBeforeUserAdminSave Called before saving user data. Gets a reference to the users data payload.
OnUserAdminLoad Called in users widget, when loading own user data (loadSingle). Gets return data and the widget as argument. $returns contains the plain user object, $parameter is a reference to the user widget.
OnUserOwnLoad Called in users widget, when loading own user data (LoadOwn, SendGoogleAuthMail). Gets return data and the widget as argument. $returns contains the plain user object, $parameter is a reference to the user widget.
BasketChangeStatus Hook is called when basket status was changed successfully. $returns contains reference to a system result object. $parameter is an object with the basket instance in key 'basket' and the changes in key 'payload' plus the language
OnBeforeConvertBasketToTask Called right before converting basket to task, has information about the basket and the payload for the new task
OnInitTaskWidget Called in project tasks widget after preparation of data in init call The returns contains an array with the preset data, parameter is the original user request
OnPrepareSiteMapLinks Called in site map generator with returns as result object and $parameter filled with list of links
OnProjectLoadEmployeeRoles Called in project widget when loading employee roles, $returns is the list of roles
OnAfterSendMail Called after successful sending email
OnBeforeResendSendMail Called before sending email to customer (again)
OnAfterPermissionCheck Called in check access to directory, The argument is of type AccessHookArgument, the result a result
OnGetAccessList Called when fetching the user session as last step. Arguments are the response and the user object
OnAfterBasketRegisterUser Called in basket widget after registration of basket is done. Arguments are the result object and an array with user_id and payload as values
OnPreImportContents Called when executing the import cronjob Argument is a file entry after the unzip process
OnRenameFolder Called when renaming the folder by short attribute update or when moving it entirely Called with Result object as return and a FolderMoveHookArgument as parameter
OnDisplay404 Called right before serving the 404 page. Allows the plugins to do some checks before. Argument is the Request object, return is a result object.
OnAddOrUpdateTask Called in task widget on create or update of task Called with Result object as return and a Task as parameter
OnAddService Called on create new service Returns is a result object and param is class with relation and payload
OnCleanupGarbage Called in garbage collect cron job Called with Result object as return and a Job as parameter
OnGetLoginRedirectUrl Called in the getter for the redirect url after successful login Called with Result object as return and the original request url as parameter
OnAfterRelationDelete Called after relation was deleted Called with Result object as return and the combination of relation and content as parameter
OnExecuteSearchUser Call in user search handler Gets the result object nd the search parameters as arguments
OnGetSearchFieldsUser Called after fetch user fields for search The returns argument is the fields of the user
OnUserStatusChange Called after the user active status is change but before saving the user Param is array with user from and target status
OnAfterUserLoginByPassword Called after user password check, param is object with user, credentials and a found indication
OnAfterUserRegisterSession Called after session registration, this is the point where the user is actually logged in Param is the user object.
OnPreUserRegisterSession Called before session registration is done, param is the user object
OnMapArrayIncludes Called after static assets are parsed in template handling Param is the list of links and the result object
OnRenderLoginExtraPre / OnRenderLoginExtra Called on rendering the login template, Response my be usd to add an additional html content
OnAfterRestUserPassword Called after password reset, with arguments result and the user object
string | $name | Name of hook |
$returns | ||
$parameter |
Plugin(string $name): \FAA\Interfaces\Plugin
Get plugin Get one of the registered plugins. This function uses the cache
string | $name | Get plugin instance |
A plugin instance or null when not registered
SystemInformation(\FAA\Obj\Request $request)
\FAA\Obj\Request | $request |
MkCompiledFolder(string $hash,string $prefix = ''): string
get compiled folder Convert a path to compiled (http root) folder and create the folder on the fly The folder will be located in /compiled/ and splitted by the first 2 components of the hash
string | $hash | A 32byte md5 hash of the folder path |
string | $prefix | A additional prefix or false when root add is requested |
The relative folder path based on hash
ProvideTemplate(string $path,string $l,string $domain,boolean $map = false,\FAA\Obj\Request $request = null): \FAA\Obj\Result
Provide template
Render a base template part and provide it for smarty. This method can deep resolve the template, map the static includes and render the navigation. when template section is defined.
string | $path | Relative path to template |
string | $l | Language code |
string | $domain | The domain id |
boolean | $map | Map assigned includes |
\FAA\Obj\Request | $request | Map registered navigation templates, when null navigation can't be parsed |
A system result object
ToPublicFile(string $src,string $root_path = '',boolean $skip_cdn = false): string
Map includes to public file
Parse object image and link tags, move the sources to the external cahce and provide the public link
string | $src | The path to the private file |
string | $root_path | Absolute path to include |
boolean | $skip_cdn |
The parsed html
ContentLink(\FAA\Obj\Generic\Folder $folder,\stdClass $content,string $language,string $title = '',string $tpl = ''): string
Create a content link tag
Map the given content to a html "A" tag (or what the template defines)
\FAA\Obj\Generic\Folder | $folder | A system folder object |
\stdClass | $content | A plain content entry |
string | $language | The request language |
string | $title | A title for the link |
string | $tpl | The output template, replacements are {href} and {title} |
The parsed template
CanonicalLink(\FAA\Obj\Request $request,string $host = '',string $template = '<link rel="canonical" href="{ur' . 'l}" />',boolean $skip_self = true): string
Create a canonical link tag
Search the linked list and return the first system link as canonical url
\FAA\Obj\Request | $request | The upstream request |
string | $host | The master domain of the system |
string | $template | The template to parse the found link into |
boolean | $skip_self | Check if the request context is the same, than return null |
The found link element or, empty
RenderBlocks(\FAA\Obj\Generic\FolderTree $folder,\FAA\Obj\Request $request,array $relations,string $name,object $hook): \FAA\Obj\Result
render the content and the extension blocks renders the given blocks using internal methods for contents and extensions
\FAA\Obj\Generic\FolderTree | $folder | A system folder object to render inside |
\FAA\Obj\Request | $request | A system request object to render for |
array | $relations | List of entries to render here |
string | $name | Name of manifest position |
object | $hook | The template hook class when available |
A default system result object
GoogleAnalyticsTag(string $hostname,string $tracking_id): string
create a google analytics tag map the given content to google analytics code snippet
string | $hostname | The website main domain |
string | $tracking_id | The google analytics tracking id |
The google analytics code snippet
YoutubeTag(string $id,integer $height,integer $width): string
create an youtube player tag map the given content to a player tag (or what the template defines)
string | $id | A youtube element id |
integer | $height | The player height |
integer | $width | The player width |
The player code snippet and js include
None found |
StringToUrl(string $dirty): string
String to clean content Prepares a string with replacement option to be used in url afterwards
string | $dirty | The content to clear for urls |
The clean element
None found |
FolderContentLink(\FAA\Obj\Request $request,object $content,mixed $tpl = '{href}'): string
create a folder content link tag map the given content to a image tag (or what the template defines)
\FAA\Obj\Request | $request | A system http request |
object | $content | Th relation object and the resolved content |
mixed | $tpl | The output template, replacements are {href} and {title} |
The parsed template
None found |
RawFolderContentLink( $request, $folder, $content): null|string|array<mixed,string>
$request | ||
$folder | ||
$content |
None found |
FolderLink(\FAA\Obj\Request $request,string $folder,string $title,mixed $tpl = '',boolean $blank = false,string $lang = ''): string
Create a folder link tag
Map the given content to a image tag (or what the template defines) The function return a / if the folder matches with the root path of the domain
\FAA\Obj\Request | $request | A system http request |
string | $folder | The path to link onto |
string | $title | A title for the link |
mixed | $tpl | The output template, replacements are {href} and {title} |
boolean | $blank | Set target to blank on demand |
string | $lang | The language to use for this link, default is the local language |
The parsed template
None found |
ResolveLinks(\FAA\Obj\Request $request, $html)
Resolve all links
Resolves all matches of 'fal::(...)::fal' tokens in the given html content Supports the %domroot% token It can resolve links in the schema fal://file-access.de/... as well starting with 4.108.0
\FAA\Obj\Request | $request | The request object |
$html |
None found |
None found |
StructuredBreadcrumb(\FAA\Obj\Request $request,boolean $raw = true,boolean $with_tag = false): array|string
create ld breadcrumb content Generates a ld json with breadcrumb content for the given request
\FAA\Obj\Request | $request | A system http request |
boolean | $raw | Return raw or, as string |
boolean | $with_tag |
The structured data or null
None found |
PathToPublicUrl(\FAA\Obj\Request $request,string $src,boolean $absolute): string
create an public path map the given content to a image tag (or what the template defines)
\FAA\Obj\Request | $request | A system http request |
string | $src | The relative path |
boolean | $absolute | Return including url |
A html content
None found |
ImageTag(\FAA\Obj\Request $request,\FAA\Obj\Generic\Asset|\stdClass $content,string $size,string $tpl = '',boolean $absolute = false): string
create an image tag map the given content to a image tag (or what the template defines)
\FAA\Obj\Request | $request | A system http request |
\FAA\Obj\Generic\Asset|\stdClass | $content | A system object content or, an asset instance |
string | $size | A registered image type |
string | $tpl | The output template, replacements are {url} and {title} |
boolean | $absolute | Return including url |
A html content
None found |
MapCssToInline(string $body)
Map the css includes and convert all linked data to inline part
Will extract all linked css files and build it into as inline css
string | $body | The html text to parse |
None found |
PostAnalyzeIncludes(string $html,boolean $js = true,boolean $css = true,string $position = '</head>'): boolean
Post filter includes
Allows the programmer of templates to move includes to certain target of html after rendering It does an clean of the html code as well regarding multiple breaks
string | $html | Reference to rendered content |
boolean | $js | Move js includes |
boolean | $css | Move css includes |
string | $position | Tag to attach after new rendering. Must start with a '</' as the attachemnt will be done before the node |
True when fitting otherwise false
None found |
MapArrayIncludes(array $data,string $ext,string $l): \FAA\Obj\Result
Map array includes
Parse javascript and css includes, as css supports import it is resolved recursively The includes can contain folder links and translation tokens
array | $data | A list of relative urls to include |
string | $ext | The type of include that is currently parsed |
string | $l | The language of request |
A result object with the parsed contents, when defined compressed and simplified
None found |
MapIncludes(string $data,string $ext,string $l,string $template_root = ''): void
map includes parse javascript and css includes, as css supports import it is resolved recursively
string | $data | The content to be parsed |
string | $ext | The type of include that is currently parsed |
string | $l | The language of request or null |
string | $template_root | Root path of parsed file when defined |
None found |
RegisterPlugins()
Register plugins
Load the plugins from filesystem and register them for hook calling This function is cached.
None found |
mapNavigation(string $data,\FAA\Obj\Request $request): string
Map navigation entries
Use this internal method to map template defined navigations a minimalistic navigation template that shows 1 line of the navigation may look like this
string | $data | The template content to parse |
\FAA\Obj\Request | $request | The processed request |
A parsed html template
None found |
mapNavigationRecurse(\FAA\Obj\Sys\Navigation $navigation,integer $level,\FAA\Obj\Sys\NavigationEntry $entry,\FAA\Obj\Request $request,array $limb,boolean $open = true): string
Convert folder structure to navigation
Take the given tree element list and the navigation object and convert the tree using the template to structured string wth the defined elements. As side effect the number of written elements will be added to the processed navigation object
\FAA\Obj\Sys\Navigation | $navigation | The navigation object |
integer | $level | The currently processed level |
\FAA\Obj\Sys\NavigationEntry | $entry | The navigation entry item |
\FAA\Obj\Request | $request | The corresponding request object |
array | $limb | The cut out folder tree limb |
boolean | $open | The parent open status |
A rendered template html
None found |
filterAssignments(array $relations,string $name): array
Filter the assigned entries by name and validness
array | $relations | An array of assigned contents |
string | $name | The position of the current manifest |
The filtered list of contents
None found |
renderExtension(\FAA\Obj\Generic\Folder $folder,object $request,string $position,object $extension,object $hook): \FAA\Obj\Result
render the the extension block renders the given block using internal methods for extensions
\FAA\Obj\Generic\Folder | $folder | A system folder object to render inside |
object | $request | A system request object to render for |
string | $position | The position to render at |
object | $extension | The extension to render here |
object | $hook | A wrapper template hook, when defined |
A default system result object
None found |
renderContent(object $folder,object $request,string $position,object $content,object $hook): \FAA\Obj\Result
render the the content block renders the given block using internal methods for content and the available templates
object | $folder | A system folder object to render inside |
object | $request | A system request object to render for |
string | $position | The position to render at |
object | $content | The content to render here |
object | $hook | A wrapper template hook, when defined |
A default system result object
None found |
mapWidgets(\FAA\&string $data)
Resolve static widgets Resolves and adds all statically included widget templates
\FAA\&string | $data | Reference to the html content to resolve |
None found |
mapImages(string $data,string $name = 'img',string $root_path = '')
map includes parse object image and link tags
string | $data | Html to be parsed |
string | $name | Html node to search for, 'img', 'meta' and 'link' are supported by default |
string | $root_path | Absolute path to include |
None found |
mapCssRecursivly(string $file_data,string $file_directory): string
map css includes replace css includes and files included in css to http root and merge files together
string | $file_data | Css content to map |
string | $file_directory | Absolute file path to target |
The parsed html
None found |