96 $this->page_owner_guid = (int) $this->hooks->triggerDeprecated(
'page_owner',
'system', null, $this->page_owner_guid,
"No longer set page owner using the 'page_owner', 'system' hook. Use route definitions instead.",
'4.3');
105 $route = $this->request->getRoute();
106 if (!$route instanceof
Route) {
136 private function detectLegacyPageOwner() {
137 $route = $this->request->getRoute();
138 if ($route instanceof
Route) {
139 if ($route->getDefault(
'_legacy_page_owner_detection') ===
false) {
146 $username = $this->request->getParam(
'username');
151 $owner = $this->request->getParam(
'owner_guid');
153 if (
$user = $this->entity_table->get((
int)
$owner)) {
160 if (!$this->request->isAction()) {
161 elgg_deprecated_notice(
'The automatic legacy page owner detection based on request parameters has been deprecated. Use route definitions if possible.',
'4.1');
167 $segments = $this->request->getUrlSegments();
184 return $entity->container_guid;
198 elgg_deprecated_notice(
'The automatic legacy page owner detection based on url segments has been deprecated. Use route definitions.',
'4.1');
216 $this->page_owner_guid =
$guid;
initializePageOwner()
Initialize the page owner by trying to autodetect or let a hook to provide the page owner...
getPageOwnerEntity()
Returns the page owner entity.
Exception thrown if an argument is not of the expected type.
elgg_deprecated_notice(string $msg, string $dep_version)
Log a notice about deprecated use of a function, view, etc.
getPageOwnerGuid()
Return the current page owner guid.
detectPageOwnerFromRoute()
Detects page owner from route.
setPageOwnerGuid(int $guid=0)
Sets a new page owner guid.
const ELGG_IGNORE_ACCESS
elgg_call() flags
if(elgg_view_exists('elgg/admin.js')) $segments
Holds page owner related functions.
__construct(Request $request, EntityTable $entity_table, PluginHooksService $hooks, UsersTable $users_table, Invoker $invoker)
Constructor.
Entity table database service.
$guid
Reset an ElggUpgrade.