Elgg  Version 4.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Page\PageOwnerService Class Reference

Holds page owner related functions. More...

Public Member Functions

 __construct (Request $request, EntityTable $entity_table, PluginHooksService $hooks, UsersTable $users_table, Invoker $invoker)
 Constructor. More...
 
 setPageOwnerGuid (int $guid=0)
 Sets a new page owner guid. More...
 
 getPageOwnerGuid ()
 Return the current page owner guid. More...
 
 getPageOwnerEntity ()
 Returns the page owner entity. More...
 

Protected Member Functions

 initializePageOwner ()
 Initialize the page owner by trying to autodetect or let a hook to provide the page owner. More...
 
 detectPageOwnerFromRoute ()
 Detects page owner from route. More...
 

Protected Attributes

 $request
 
 $entity_table
 
 $users_table
 
 $hooks
 
 $invoker
 
 $page_owner_guid = 0
 

Detailed Description

Holds page owner related functions.

Definition at line 20 of file PageOwnerService.php.

Constructor & Destructor Documentation

Elgg\Page\PageOwnerService::__construct ( Request  $request,
EntityTable  $entity_table,
PluginHooksService  $hooks,
UsersTable  $users_table,
Invoker  $invoker 
)

Constructor.

Parameters
Request$requestRequest
EntityTable$entity_tableEntity table
PluginHooksService$hooksHooks
UsersTable$users_tableUsers table
Invoker$invokerInvoker

Definition at line 61 of file PageOwnerService.php.

Member Function Documentation

Elgg\Page\PageOwnerService::detectPageOwnerFromRoute ( )
protected

Detects page owner from route.

Returns
int|void detected page owner guid or void if none detected

Definition at line 104 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::getPageOwnerEntity ( )

Returns the page owner entity.

Returns
|false the current page owner or false if none.

Definition at line 233 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::getPageOwnerGuid ( )

Return the current page owner guid.

Returns
int

Definition at line 224 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::initializePageOwner ( )
protected

Initialize the page owner by trying to autodetect or let a hook to provide the page owner.

Returns
void

Definition at line 82 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::setPageOwnerGuid ( int  $guid = 0)

Sets a new page owner guid.

Parameters
int$guidthe new page owner
Exceptions
InvalidArgumentException
Returns
void

Definition at line 212 of file PageOwnerService.php.

Member Data Documentation

Elgg\Page\PageOwnerService::$entity_table
protected

Definition at line 30 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::$hooks
protected

Definition at line 40 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::$invoker
protected

Definition at line 45 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::$page_owner_guid = 0
protected

Definition at line 50 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::$request
protected

Definition at line 25 of file PageOwnerService.php.

Elgg\Page\PageOwnerService::$users_table
protected

Definition at line 35 of file PageOwnerService.php.


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