Elgg  Version 6.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 (protected Request $request, protected EntityTable $entity_table, protected EventsService $events, protected 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

 detectPageOwnerFromRoute ()
 Detects page owner from route. More...
 

Protected Attributes

int $page_owner_guid = 0
 

Detailed Description

Holds page owner related functions.

Definition at line 19 of file PageOwnerService.php.

Constructor & Destructor Documentation

◆ __construct()

Elgg\Page\PageOwnerService::__construct ( protected Request  $request,
protected EntityTable  $entity_table,
protected EventsService  $events,
protected Invoker  $invoker 
)

Constructor.

Parameters
Request$requestRequest
EntityTable$entity_tableEntity table
EventsService$eventsEvents
Invoker$invokerInvoker

Definition at line 31 of file PageOwnerService.php.

Member Function Documentation

◆ detectPageOwnerFromRoute()

Elgg\Page\PageOwnerService::detectPageOwnerFromRoute ( )
protected

Detects page owner from route.

Returns
int detected page owner guid or void if none detected

Definition at line 45 of file PageOwnerService.php.

◆ getPageOwnerEntity()

Elgg\Page\PageOwnerService::getPageOwnerEntity ( )

Returns the page owner entity.

Returns
null|\ElggEntity the current page owner or null if none.

Definition at line 85 of file PageOwnerService.php.

◆ getPageOwnerGuid()

Elgg\Page\PageOwnerService::getPageOwnerGuid ( )

Return the current page owner guid.

Returns
int

Definition at line 76 of file PageOwnerService.php.

◆ setPageOwnerGuid()

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

Sets a new page owner guid.

Parameters
int$guidthe new page owner
Returns
void
Exceptions
RangeException

Definition at line 63 of file PageOwnerService.php.

Member Data Documentation

◆ $page_owner_guid

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

Definition at line 21 of file PageOwnerService.php.


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