/** * beforeFilter * * @return void */ public function beforeFilter() { parent::beforeFilter(); //CategoryEditComponentの削除 if ($this->params['action'] === 'index') { $this->Components->unload('Categories.CategoryEdit'); } }
/** * beforeRender * * @return void */ public function beforeFilter() { parent::beforeFilter(); if (!Current::read('Block.id')) { $this->setAction('emptyRender'); return false; } if (!($faq = $this->Faq->getFaq())) { $this->setAction('throwBadRequest'); return false; } $this->set('faq', $faq['Faq']); }