controller_before.*
Triggered before the execution of a specified PHP controller.
Teamwork
Input (passed by reference)
$params['controller'] object Controller class instance.
$params['params'] array The parameters used for the controller execution.
$params['params'] array The parameters used for the controller execution.
… your plugin code …
Output
Teamwork
Plugin code example
PHP
/** * 'handlers' => [ * 'controller_before.tasksTasksInfoAction' => 'controllerBeforeTasksTasksInfoAction', * ], */ public function controllerBeforeTasksTasksInfoAction(&$params) { waLog::log( sprintf_wp('Task %s is about to be viewed.', waRequest::get('n')), sprintf('tasks/plugins/%s/task_before_view.log', $this->id) ); }