Elgg  Version 6.1
actions.php
Go to the documentation of this file.
1 <?php
34 function elgg_register_action(string $action, string $filename = '', string $access = 'logged_in', array $params = []): void {
35  _elgg_services()->actions->register($action, $filename, $access, $params);
36 }
37 
45 function elgg_unregister_action(string $action): void {
46  _elgg_services()->actions->unregister($action);
47 }
48 
56 function elgg_build_hmac($data): \Elgg\Security\Hmac {
57  return _elgg_services()->hmac->getHmac($data);
58 }
59 
68 function elgg_action_exists(string $action): bool {
69  return _elgg_services()->actions->exists($action);
70 }
71 
78 function elgg_is_xhr(): bool {
79  return _elgg_services()->request->isXmlHttpRequest();
80 }
$params
Saves global plugin settings.
Definition: save.php:13
elgg_register_action(string $action, string $filename= '', string $access= 'logged_in', array $params=[])
Elgg Actions.
Definition: actions.php:34
if(elgg_view_exists("widgets/{$widget->handler}/edit")) $access
Definition: save.php:19
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
Definition: LICENSE.txt:215
if(!$entity instanceof\ElggUser) $data
Definition: attributes.php:13
elgg_action_exists(string $action)
Check if an action is registered and its script exists.
Definition: actions.php:68
$action
Definition: subscribe.php:11
_elgg_services()
Get the global service provider.
Definition: elgglib.php:353
elgg_build_hmac($data)
Get an HMAC token builder/validator object.
Definition: actions.php:56
elgg_is_xhr()
Checks whether the request was requested via ajax.
Definition: actions.php:78
elgg_unregister_action(string $action)
Unregisters an action.
Definition: actions.php:45