94 return implode(
':', array_filter($route_parts));
98 [$entity->type, $entity->subtype],
99 [$entity->type, null],
102 foreach ($pairs as $pair) {
103 $route_name = $make_route_name($pair[0], $pair[1]);
124 $url =
"action/$action";
128 if ($add_csrf_tokens) {
elgg_http_add_url_query_elements($url, array $elements)
Sets elements in a URL's query string.
if(!$user||!$user->canDelete()) $name
if(!$entity->delete()) $forward_url
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
$params
Saves global plugin settings.
elgg_generate_action_url($action, array $query=[], $add_csrf_tokens=true)
Generate an action URL.
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_unregister_route($name)
Unregister a route by its name.
$guid
Removes an admin notice.
elgg_entity_gatekeeper($guid, $type=null, $subtype=null)
Can the viewer see this entity?
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
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_generate_url($name, array $parameters=[])
Generate a URL for named route.
elgg_ajax_gatekeeper()
Require that the current request be an XHR.
elgg_register_route($name, array $params=[])
Register a new route.
elgg system_message
Wrapper function for system_messages.
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_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_services()
Get the global service provider.
elgg_generate_entity_url(ElggEntity $entity, $resource= 'view', $subresource=null, array $parameters=[])
Generate entity URL from a named route.