Elgg  Version 7.1
Protected Member Functions | Protected Attributes | List of all members
Elgg\Controllers\GenericContentListing Class Reference

Generic controller to handle entity listing routes. More...

Inheritance diagram for Elgg\Controllers\GenericContentListing:
Elgg\Controllers\GenericContent

Protected Member Functions

 handleRequest (\Elgg\Request $request)
 {Handle the request.
Parameters
\Elgg\Request$requestthe Elgg request
Returns
Response
Exceptions
HttpException
} More...
 
 assertValidRoute ()
 {Validate that route is supported.
Returns
void
Exceptions
ValidationException
} More...
 
 getPage ()
 {Get the page from the route name.
Returns
string
Exceptions
ValidationException
} More...
 
 parseRoute ()
 Parse the route name to usable parts. More...
 
 getGroupToolOption ()
 Get the name of the group tool option for group routes. More...
 
 getListingOptions (string $page, array $options)
 Get additional options to use for elgg_list_entities() More...
 
 getPageOptions (string $page, array $options)
 {Get additional options to use when viewing a page.
Parameters
string$pagefor which page to get the options ('all', 'owner', 'group', 'friends', 'view', 'add', etc.)
array$optionscurrent page options
Returns
array
See also
elgg_view_page()
} More...
 
 listAll (array $options)
 All content item listing. More...
 
 listFriends (array $options)
 Friends content item listing. More...
 
 listGroup (array $options)
 Group content item listing. More...
 
 listOwner (array $options)
 Owner content item listing. More...
 
- Protected Member Functions inherited from Elgg\Controllers\GenericContent
 getRouteParts ()
 Parse the route name to usable parts. More...
 
 getEntityType ()
 Get the entity type from the route name. More...
 
 getEntitySubtype ()
 Get the entity subtype from the route name. More...
 

Protected Attributes

ElggEntity $page_owner = null
 
- Protected Attributes inherited from Elgg\Controllers\GenericContent
Elgg Request $request = null
 
Elgg Router Route $route = null
 
array $route_parts = null
 

Additional Inherited Members

- Public Member Functions inherited from Elgg\Controllers\GenericContent
 __invoke (\Elgg\Request $request)
 Handle a request. More...
 

Detailed Description

Generic controller to handle entity listing routes.

Since
7.0

Definition at line 14 of file GenericContentListing.php.

Member Function Documentation

◆ assertValidRoute()

Elgg\Controllers\GenericContentListing::assertValidRoute ( )
protected

{Validate that route is supported.

Returns
void
Exceptions
ValidationException
}

Reimplemented from Elgg\Controllers\GenericContent.

Definition at line 44 of file GenericContentListing.php.

◆ getGroupToolOption()

Elgg\Controllers\GenericContentListing::getGroupToolOption ( )
protected

Get the name of the group tool option for group routes.

Returns
string|null

Definition at line 80 of file GenericContentListing.php.

◆ getListingOptions()

Elgg\Controllers\GenericContentListing::getListingOptions ( string  $page,
array  $options 
)
protected

Get additional options to use for elgg_list_entities()

Parameters
string$pagefor which page to get the options ('all', 'owner', 'group', 'friends')
array$optionsoptions based on the route information
Returns
array
See also
elgg_list_entities()

Definition at line 93 of file GenericContentListing.php.

◆ getPage()

Elgg\Controllers\GenericContentListing::getPage ( )
protected

{Get the page from the route name.

Returns
string
Exceptions
ValidationException
}

Reimplemented from Elgg\Controllers\GenericContent.

Definition at line 55 of file GenericContentListing.php.

◆ getPageOptions()

Elgg\Controllers\GenericContentListing::getPageOptions ( string  $page,
array  $options 
)
protected

{Get additional options to use when viewing a page.

Parameters
string$pagefor which page to get the options ('all', 'owner', 'group', 'friends', 'view', 'add', etc.)
array$optionscurrent page options
Returns
array
See also
elgg_view_page()
}

Reimplemented from Elgg\Controllers\GenericContent.

Definition at line 100 of file GenericContentListing.php.

◆ handleRequest()

Elgg\Controllers\GenericContentListing::handleRequest ( \Elgg\Request  $request)
finalprotected

{Handle the request.

Parameters
\Elgg\Request$requestthe Elgg request
Returns
Response
Exceptions
HttpException
}

Reimplemented from Elgg\Controllers\GenericContent.

Definition at line 21 of file GenericContentListing.php.

◆ listAll()

Elgg\Controllers\GenericContentListing::listAll ( array  $options)
protected

All content item listing.

for the routes:

  • default:<type>:<subtype>
  • collection:<type>:<subtype>:all
Parameters
array$optionslisting options
Returns
string

Definition at line 154 of file GenericContentListing.php.

◆ listFriends()

Elgg\Controllers\GenericContentListing::listFriends ( array  $options)
protected

Friends content item listing.

for the route:

  • collection:<type>:<subtype>:friends
Parameters
array$optionslisting options
Returns
string
Exceptions
BadRequestException

Definition at line 175 of file GenericContentListing.php.

◆ listGroup()

Elgg\Controllers\GenericContentListing::listGroup ( array  $options)
protected

Group content item listing.

for the route:

  • collection:<type>:<subtype>:group
Parameters
array$optionslisting options
Returns
string
Exceptions
BadRequestException
GroupToolGatekeeperException

Definition at line 209 of file GenericContentListing.php.

◆ listOwner()

Elgg\Controllers\GenericContentListing::listOwner ( array  $options)
protected

Owner content item listing.

for the route:

  • collection:<type>:<subtype>:owner
Parameters
array$optionslisting options
Returns
string
Exceptions
BadRequestException

Definition at line 246 of file GenericContentListing.php.

◆ parseRoute()

Elgg\Controllers\GenericContentListing::parseRoute ( )
finalprotected

Parse the route name to usable parts.

Returns
array
Exceptions
ValidationException

Definition at line 65 of file GenericContentListing.php.

Member Data Documentation

◆ $page_owner

ElggEntity Elgg\Controllers\GenericContentListing::$page_owner = null
protected

Definition at line 16 of file GenericContentListing.php.


The documentation for this class was generated from the following file: