/** * @desc: Works like a constructor */ function beforeFilter() { parent::beforeFilter(); $this->layoutOpt['left_nav'] = "user"; $this->layoutOpt['left_nav_selected'] = "view_users"; if ($this->isAjax) { $this->layoutOpt['layout'] = 'ajax'; } else { $this->layoutOpt['layout'] = 'left_bar_template'; } $this->side_bar = "admin"; $this->set("side_bar", $this->side_bar); }
/** * beforeFilter * * @return void */ public function beforeFilter() { parent::beforeFilter(); //ウィザードの設定 if (in_array($this->params['action'], ['notify'], true)) { unset($this->helpers['NetCommons.Wizard']['navibar'][self::WIZARD_USERS]['url']); unset($this->helpers['NetCommons.Wizard']['navibar'][self::WIZARD_USERS_ROLES_ROOMS]['url']); } //メール通知の場合、NetCommonsMailUtilityをメンバー変数にセットする。Mockであれば、newをしない。 //テストでMockに差し替えが必要なための処理であるので、カバレッジレポートから除外する。 //@codeCoverageIgnoreStart if ($this->params['action'] === 'notify' && substr(get_class($this->mail), 0, 4) !== 'Mock') { $this->mail = new NetCommonsMail(); } //@codeCoverageIgnoreEnd }