35 return _elgg_services()->router->registerPageHandler($identifier, $function);
118 if (null === $group_guid) {
129 if (!$visibility->shouldHideItems) {
139 $forward_reason =
'login';
141 $forward_reason =
'member';
145 'non_member' =>
'membershiprequired',
146 'logged_out' =>
'loggedinrequired',
147 'no_access' =>
'noaccess',
214 $hook_type =
"{$entity->getType()}:{$entity->getSubtype()}";
268 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated. Error pages are drawn by resource views without "forward" hook.',
'2.3');
275 if (
$vars === null) {
368 $events->registerHandler(
'init',
'system',
'_elgg_page_handler_init');
_elgg_page_handler_init()
Initializes the page handler/routing system.
if(!$owner||!($owner instanceof ElggUser)||!$owner->canEdit()) $error
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
elgg_is_xhr()
Checks whether the request was requested via ajax.
if(!$entity->delete()) $forward_url
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_view_resource($name, array $vars=[])
Render a resource view.
elgg_redirect_response($forward_url=REFERRER, $status_code=ELGG_HTTP_FOUND)
Prepare a silent redirect response to be returned by a page or an action handler. ...
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.
admin_gatekeeper()
Alias of elgg_admin_gatekeeper()
elgg_entity_exists($guid)
Does an entity exist?
$guid
Removes an admin notice.
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
elgg_entity_gatekeeper($guid, $type=null, $subtype=null, $forward=true)
Can the viewer see this entity?
elgg_error_page_handler($hook, $type, $result, $params)
Serve an error page.
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.
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an and optionally for type and subtype.
elgg_error_response($error= '', $forward_url=REFERRER, $status_code=ELGG_HTTP_OK)
Prepare an error response to be returned by a page or an action handler.
elgg echo
Translates a string.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
elgg_register_page_handler($identifier, $function)
Registers a page handler for a particular identifier.
elgg_ajax_gatekeeper()
Require that the current request be an XHR.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
clearfix elgg elgg elgg elgg page header
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
Redirect response builder.
elgg system_message
Wrapper function for system_messages.
elgg_unregister_page_handler($identifier)
Unregister a page handler for an identifier.
elgg_ok_response($content= '', $message= '', $forward_url=null, $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
static factory($container_guid, $use_cache=true)
Determine visibility of items within a container for the current user.
elgg_admin_gatekeeper()
Used at the top of a page to mark it as admin only.
elgg register_error
Wrapper function for system_messages.
$content
Set robots.txt action.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
gatekeeper()
Alias of elgg_gatekeeper()
elgg_front_page_handler()
Front page handler.
get_entity($guid)
Loads and returns an entity object from a guid.