Jump to main content Jump to doc navigation

Event: OnBeforeManagerPageInit

Fires right before a Manager controller runs, after the permission check.

  • Service: 2 - Manager Access Events
  • Group: System

Event Parameters

Name Description
action The route or action to load in the current namespace
controller The same value as action
namespace The namespace (as a string) for the current namespace
namespace_path The core path for the namespace

On Manager error pages these keys are absent from the controller config — the Error controller is created with a message (and errors) only. Check them with isset() before use.

Remarks

Previous event OnManagerPageInit
Next event OnManagerPageBeforeRender
File core/src/Revolution/modManagerController.php
Class abstract class MODX\Revolution\modManagerController
Method public function render()

Example

<?php
$eventName = $modx->event->name;
switch($eventName) {
    case 'OnBeforeManagerPageInit':
        print_r($action);
        break;
}

See Also

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • A. Moreno
  • Alex
  • Chris Fickling
  • Stéphane Jäggi
  • YJ
  • Murray Wood
  • JT Skaggs
  • Anton Tarasov
  • deJaya
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

$185 per month—let's make that $500!

Learn more