Elgg
Version 1.9
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
elgg_register_page_handler ($identifier, $function) | |
Registers a page handler for a particular identifier. More... | |
elgg_unregister_page_handler ($identifier) | |
Unregister a page handler for an identifier. More... | |
elgg_gatekeeper () | |
Used at the top of a page to mark it as logged in users only. More... | |
gatekeeper () | |
Alias of elgg_gatekeeper() More... | |
elgg_admin_gatekeeper () | |
Used at the top of a page to mark it as admin only. More... | |
admin_gatekeeper () | |
Alias of elgg_admin_gatekeeper() More... | |
elgg_group_gatekeeper ($forward=true, $group_guid=null) | |
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account. More... | |
group_gatekeeper ($forward=true, $page_owner_guid=null) | |
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account. More... | |
elgg_entity_gatekeeper ($guid, $type=null, $subtype=null) | |
Can the viewer see this entity? More... | |
elgg_front_page_handler () | |
Front page handler. More... | |
elgg_error_page_handler ($hook, $type, $result, $params) | |
Serve an error page. More... | |
_elgg_page_handler_init () | |
Initializes the page handler/routing system. More... | |
_elgg_page_handler_init | ( | ) |
Initializes the page handler/routing system.
Definition at line 293 of file pagehandler.php.
admin_gatekeeper | ( | ) |
Alias of elgg_admin_gatekeeper()
Used at the top of a page to mark it as logged in admin or siteadmin only.
Definition at line 100 of file pagehandler.php.
elgg_admin_gatekeeper | ( | ) |
Used at the top of a page to mark it as admin only.
Definition at line 83 of file pagehandler.php.
elgg_entity_gatekeeper | ( | $guid, | |
$type = null , |
|||
$subtype = null |
|||
) |
Can the viewer see this entity?
Tests if the entity exists and whether the viewer has access to the entity if it does. If the viewer cannot view this entity, it forwards to an appropriate page.
int | $guid | Entity GUID |
string | $type | Optional required entity type |
string | $subtype | Optional required entity subtype |
Definition at line 185 of file pagehandler.php.
elgg_error_page_handler | ( | $hook, | |
$type, | |||
$result, | |||
$params | |||
) |
Serve an error page.
This is registered by Elgg for the 'forward', '404' plugin hook. It can registered for other hooks by plugins or called directly to display an error page.
string | $hook | The name of the hook |
string | $type | Http error code |
bool | $result | The current value of the hook |
array | $params | Parameters related to the hook |
Definition at line 251 of file pagehandler.php.
elgg_front_page_handler | ( | ) |
elgg_gatekeeper | ( | ) |
Used at the top of a page to mark it as logged in users only.
Definition at line 58 of file pagehandler.php.
elgg_group_gatekeeper | ( | $forward = true , |
|
$group_guid = null |
|||
) |
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account.
bool | $forward | If set to true (default), will forward the page; if set to false, will return true or false. |
int | $group_guid | The group that owns the page. If not set, this will be pulled from elgg_get_page_owner_guid(). |
Definition at line 117 of file pagehandler.php.
elgg_register_page_handler | ( | $identifier, | |
$function | |||
) |
Registers a page handler for a particular identifier.
For example, you can register a function called 'blog_page_handler' for the identifier 'blog' For all URLs http://yoururl/blog/*, the blog_page_handler() function will be called. The part of the URL marked with * above will be exploded on '/' characters and passed as an array to that function. For example, the URL http://yoururl/blog/username/friends/ would result in the call: blog_page_handler(array('username','friends'), blog);
A request to register a page handler with the same identifier as previously registered handler will replace the previous one.
The context is set to the identifier before the registered page handler function is called. For the above example, the context is set to 'blog'.
Page handlers should return true to indicate that they handled the request. Requests not handled are forwarded to the front page with a reason of 404. Plugins can register for the 'forward', '404' plugin hook.
string | $identifier | The page type identifier |
string | $function | Your function name |
Definition at line 34 of file pagehandler.php.
elgg_unregister_page_handler | ( | $identifier | ) |
Unregister a page handler for an identifier.
Note: to replace a page handler, call elgg_register_page_handler()
string | $identifier | The page type identifier |
Definition at line 48 of file pagehandler.php.
gatekeeper | ( | ) |
Alias of elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
Definition at line 73 of file pagehandler.php.
group_gatekeeper | ( | $forward = true , |
|
$page_owner_guid = null |
|||
) |
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account.
bool | $forward | If set to true (default), will forward the page; if set to false, will return true or false. |
int | $page_owner_guid | The current page owner guid. If not set, this will be pulled from elgg_get_page_owner_guid(). |
Definition at line 168 of file pagehandler.php.