BaseEventTypeController::initAction PHP Method

initAction() protected method

initAction[$action] and calls it.
protected initAction ( string $action )
$action string
    protected function initAction($action)
    {
        $init_method = 'initAction' . ucfirst($action);
        if (method_exists($this, $init_method)) {
            $this->{$init_method}();
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Set up some key js vars.
  *
  * @param string $action
  */
 protected function initAction($action)
 {
     parent::initAction($action);
     if (in_array($action, array('create', 'update'))) {
         $this->jsVars['OE_gp_id'] = $this->patient->gp_id;
         $this->jsVars['OE_practice_id'] = $this->patient->practice_id;
         $this->loadDirectLines();
     }
 }
BaseEventTypeController