22 $this->page_owner = $this->route?->resolvePageOwner();
29 'type' => $parsed_route[
'type'],
30 'subtype' => $parsed_route[
'subtype'],
33 $listing_function =
'list' . str_replace(
' ',
'', ucwords(str_replace([
'_',
'-'],
' ', $parsed_route[
'page'])));
34 if (!is_callable([$this, $listing_function])) {
45 $route_parts = $this->getRouteParts();
47 if (!in_array($route_parts[0], [
'default',
'collection'])) {
56 return $this->getRouteParts()[3] ??
'all';
66 $route_parts = $this->getRouteParts();
69 'type' => $route_parts[1],
70 'subtype' => $route_parts[2],
71 'page' => $route_parts[3] ??
'all',
81 return $this->route?->getOption(
'group_tool');
102 $options[
'filter_id'] =
"{$this->getEntitySubtype()}/group";
105 if (!isset(
$options[
'filter_value'])) {
106 $filter_value =
$page;
112 $filter_value =
'all';
119 $options[
'filter_value'] = $filter_value;
123 $sidebar_view = $this->route?->getOption(
'sidebar_view');
127 'entity' => $this->page_owner,
133 if (
$page ===
'owner') {
134 $options[
'title'] =
elgg_echo(
"collection:{$this->getEntityType()}:{$this->getEntitySubtype()}:{$page}", [$this->page_owner?->getDisplayName()]);
136 $options[
'title'] =
elgg_echo(
"collection:{$this->getEntityType()}:{$this->getEntitySubtype()}:{$page}");
156 'content' =>
elgg_view(
'page/list/all', [
160 'filter_value' =>
'all',
176 if (!$this->page_owner instanceof \
ElggUser) {
183 'relationship' =>
'friend',
184 'relationship_guid' => $this->page_owner->guid,
185 'relationship_join_on' =>
'owner_guid',
189 'content' =>
elgg_view(
'page/list/all', [
190 'entity' => $this->page_owner,
191 'options' => array_merge(
$options, $friends_options),
214 $group_tool = $this->getGroupToolOption();
215 if (isset($group_tool)) {
222 'container_guid' => $this->page_owner->guid,
223 'preload_containers' =>
false,
227 'content' =>
elgg_view(
'page/list/all', [
228 'entity' => $this->page_owner,
229 'options' => array_merge(
$options, $group_options),
247 if (!$this->page_owner instanceof \
ElggUser) {
254 'owner_guid' => $this->page_owner->guid,
255 'preload_owners' =>
false,
259 'content' =>
elgg_view(
'page/list/all', [
260 'entity' => $this->page_owner,
return[ 'admin/delete_admin_notices'=>['access'=> 'admin'], 'admin/menu/save'=>['access'=> 'admin'], 'admin/plugins/activate'=>['access'=> 'admin'], 'admin/plugins/activate_all'=>['access'=> 'admin'], 'admin/plugins/deactivate'=>['access'=> 'admin'], 'admin/plugins/deactivate_all'=>['access'=> 'admin'], 'admin/plugins/set_priority'=>['access'=> 'admin'], 'admin/security/security_txt'=>['access'=> 'admin'], 'admin/security/settings'=>['access'=> 'admin'], 'admin/security/regenerate_site_secret'=>['access'=> 'admin'], 'admin/site/cache/clear'=>['access'=> 'admin'], 'admin/site/cache/invalidate'=>['access'=> 'admin'], 'admin/site/icons'=>['access'=> 'admin'], 'admin/site/set_maintenance_mode'=>['access'=> 'admin'], 'admin/site/set_robots'=>['access'=> 'admin'], 'admin/site/theme'=>['access'=> 'admin'], 'admin/site/unlock_upgrade'=>['access'=> 'admin'], 'admin/site/settings'=>['access'=> 'admin'], 'admin/upgrade'=>['access'=> 'admin'], 'admin/upgrade/reset'=>['access'=> 'admin'], 'admin/user/ban'=>['access'=> 'admin'], 'admin/user/bulk/ban'=>['access'=> 'admin'], 'admin/user/bulk/delete'=>['access'=> 'admin'], 'admin/user/bulk/unban'=>['access'=> 'admin'], 'admin/user/bulk/validate'=>['access'=> 'admin'], 'admin/user/change_email'=>['access'=> 'admin'], 'admin/user/delete'=>['access'=> 'admin'], 'admin/user/login_as'=>['access'=> 'admin'], 'admin/user/logout_as'=>[], 'admin/user/makeadmin'=>['access'=> 'admin'], 'admin/user/resetpassword'=>['access'=> 'admin'], 'admin/user/removeadmin'=>['access'=> 'admin'], 'admin/user/unban'=>['access'=> 'admin'], 'admin/user/validate'=>['access'=> 'admin'], 'annotation/delete'=>[], 'avatar/upload'=>[], 'comment/save'=>[], 'diagnostics/download'=>['access'=> 'admin', 'controller'=> \Elgg\Diagnostics\DownloadController::class,], 'entity/chooserestoredestination'=>[], 'entity/delete'=>[], 'entity/mute'=>[], 'entity/restore'=>[], 'entity/subscribe'=>[], 'entity/trash'=>[], 'entity/unmute'=>[], 'entity/unsubscribe'=>[], 'login'=>['access'=> 'logged_out'], 'logout'=>[], 'notifications/mute'=>['access'=> 'public'], 'plugins/settings/remove'=>['access'=> 'admin'], 'plugins/settings/save'=>['access'=> 'admin'], 'plugins/usersettings/save'=>[], 'register'=>['access'=> 'logged_out', 'middleware'=>[\Elgg\Router\Middleware\RegistrationAllowedGatekeeper::class,],], 'river/delete'=>[], 'settings/notifications'=>[], 'settings/notifications/subscriptions'=>[], 'user/changepassword'=>['access'=> 'public'], 'user/requestnewpassword'=>['access'=> 'public'], 'useradd'=>['access'=> 'admin'], 'usersettings/save'=>[], 'widgets/add'=>[], 'widgets/delete'=>[], 'widgets/move'=>[], 'widgets/save'=>[],]
Generic controller to handle entity listing routes.
listGroup(array $options)
Group content item listing.
getPage()
{Get the page from the route name.string }
assertValidRoute()
{Validate that route is supported.void }
listFriends(array $options)
Friends content item listing.
getListingOptions(string $page, array $options)
Get additional options to use for elgg_list_entities()
listAll(array $options)
All content item listing.
getPageOptions(string $page, array $options)
{Get additional options to use when viewing a page.for which page to get the options ('all',...
handleRequest(\Elgg\Request $request)
{Handle the request.the Elgg requestResponse }
parseRoute()
Parse the route name to usable parts.
listOwner(array $options)
Owner content item listing.
getGroupToolOption()
Get the name of the group tool option for group routes.
Generic base controller for content listing and content view/edit/add.
Thrown when request is malformatted.
Action validation exception.
if(count($css_vars)< 2) $options
elgg_push_collection_breadcrumbs(string $entity_type, string $entity_subtype, ?\ElggEntity $container=null, bool $friends=false)
Resolves and pushes collection breadcrumbs for a container.
elgg_register_title_button(string $name='add', string $entity_type='', string $entity_subtype='')
Convenience function for registering a button to the title menu.
elgg_group_tool_gatekeeper(string $tool_name, ?int $group_guid=null)
Checks if a group has a specific tool enabled.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_view_exists(string $view, string $viewtype='', bool $recurse=true)
Returns whether the specified view exists.
elgg_view_page(string $title, string|array $body, string $page_shell='default', array $vars=[])
Assembles and outputs a full page.
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
elgg_ok_response($content='', string|array $message='', ?string $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
if(! $entity instanceof \ElggGroup) $owner_options