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');
$content
Set robots.txt action.
if(! $owner||!($owner instanceof ElggUser)||! $owner->canEdit()) $error
elgg_is_xhr()
Checks whether the request was requested via ajax.
clearfix elgg elgg elgg elgg page header
static factory($container_guid, $use_cache=true)
Determine visibility of items within a container for the current user.
Redirect response builder.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
$guid
Removes an admin notice.
register_error($error)
Display an error on next page load.
system_message($message)
Display a system message on next page load.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
forward($location="", $reason='system')
Forward to $location.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an \ElggEntity and optionally for type and subtype.
get_entity($guid)
Loads and returns an entity object from a guid.
elgg_entity_exists($guid)
Does an entity exist?
if(! $entity->delete()) $forward_url
if(! $display_name) $type
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.
gatekeeper()
Alias of elgg_gatekeeper()
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_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.
admin_gatekeeper()
Alias of elgg_admin_gatekeeper()
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,...
elgg_register_page_handler($identifier, $function)
Registers a page handler for a particular 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.
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
elgg_admin_gatekeeper()
Used at the top of a page to mark it as admin only.
_elgg_page_handler_init()
Initializes the page handler/routing system.
elgg_front_page_handler()
Front page handler.
elgg_entity_gatekeeper($guid, $type=null, $subtype=null, $forward=true)
Can the viewer see this entity?
elgg_unregister_page_handler($identifier)
Unregister a page handler for an identifier.
elgg_error_page_handler($hook, $type, $result, $params)
Serve an error page.
elgg_ajax_gatekeeper()
Require that the current request be an XHR.
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,...
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.