$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
$interfaces : array<mixed,\FAA\Obj\Endpoint>|array<mixed,object>
List of endpoints
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 |
Is(string $path, string $method, boolean $must_be_active = true) : \FAA\Obj\Endpoint
Check if request is REST interface call
Try to find a corresponding widget endpoint for the given path and method As of version 3.29.0, this works just for requests that start with "/api/" In addition the breakpoint will be the first hit and no longer the last one.
string | $path | The HTTP request path |
string | $method | The HTTP request method |
boolean | $must_be_active |
A system REST interface endpoint object or null
ServeRequest(\FAA\Obj\Endpoint $endpoint, \FAA\Obj\Request $request)
Serve request Parse the given request execute registered function and send fitting http response
\FAA\Obj\Endpoint | $endpoint | A system REST endpoint object |
\FAA\Obj\Request | $request | A system request object |
LoadInterfaceEndpoints(string $file, boolean $plain = false) : array
List endpoints of one widget get merged list of available endpoints from storage file, this method is full ached
string | $file | Filename of searched widget |
boolean | $plain | Fetch plain or raw when set to false |
A list with all registered endpoints of the system
ProvideInterfaceCss() : string
get interface hide and show css creates a stylesheet with all elements a user is not allowed to see inside the gui, the rule set is not very restrictive and has no security aspact it is just a styling helper access rule evaluation is handled inside the interface endpoint handler itself
a widget end point based hiding table of special elements
GetFullAccessList(\FAA\Obj\Generic\User $user) : \FAA\Obj\Result
Get access list Get the whole users access list for all registered widgets, this method is cached
\FAA\Obj\Generic\User | $user | A system user object, is null for not logged users |
A system result object
HasAccess(\FAA\Obj\Generic\Widget $widget, \FAA\Obj\Generic\User $user, string $op = 'call', boolean $skip_root = false) : \FAA\Obj\Result
Check access permission on Test the access to certain end point of REST widget by specific user and level
\FAA\Obj\Generic\Widget | $widget | The REST widget |
\FAA\Obj\Generic\User | $user | A system user object, is null for not logged users |
string | $op | A registered widget callback |
boolean | $skip_root |
A system result object
GetWidget(string $name, string $language = null, boolean $plain = true) : \FAA\Obj\Result
get single widget load a widget registry entry
string | $name | A registered widget name |
string | $language | A registered language token |
boolean | $plain | Load as plain or raw object when false |
A system result object
DeletePlugin(string $id) : \FAA\Obj\Result
Delete plugin
Delete the plugin and deregister from whole handler setup. System plugins can be deleted in master system only
string | $id | The plugin id |
CreatePlugin( $data) : \FAA\Obj\Result
Create a new plugin based on user defined data
$data |
CreateWidget( $payload) : \FAA\Obj\Result
Register a new widget in the storage of system or user
$payload |
ListWidgets(string $language = null, boolean $plain = true) : \FAA\Obj\Result
get all interfaces fetch the list of registered interface classes
string | $language | A registered language token |
boolean | $plain | When set to false, return as list of instances |
A system result object
ListWidgetNotifications(string $language = null) : \FAA\Obj\Result
Get all notifications Fetch the list of registered notifications
string | $language | A registered language token |
A system result object
GetInterfaces() : array<mixed,\FAA\Obj\Endpoint>|array<mixed,object>
Get all interfaces
Fetch the list of registered interface classes This method is cached statically and uses the memory cache handler.
The list of system interface endpoints
ExtensionToWidget(\FAA\Obj\Generic\Widget $extension) : \FAA\Obj\Result
Get all interfaces Fetch the list of registered interface classes
\FAA\Obj\Generic\Widget | $extension | A system widget |
A result object with widget when found