public function beforeFilter()
 {
     parent::beforeFilter();
     if (preg_match('/^admin_/', $this->action)) {
         $this->subMenuElements = array('members');
     }
 }
 /**
  * beforeFilter
  *
  * @return	void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $judgePetitBlogCustomFieldConfigUse = false;
     $judgePetitBlogCustomFieldUse = false;
     $message = '';
     // ブログ設定データを取得
     $BlogContentModel = ClassRegistry::init('Blog.BlogContent');
     $this->blogContentDatas = $BlogContentModel->find('list', array('recursive' => -1));
     // プチ・ブログカスタムフィールド設定データを取得
     $datas = $this->PetitBlogCustomFieldConfig->find('all', array('recursive' => -1));
     // カスタムフィールドの設定データ数よりブログ設定データの方が多ければ、メニューを表示する
     if (count($this->blogContentDatas) > count($datas)) {
         $message .= '「プチ・ブログカスタムフィールド設定データ」にてプチ・ブログカスタムフィールド設定用のデータを作成して下さい。';
     } else {
         $judgePetitBlogCustomFieldConfigUse = true;
     }
     // ブログ設定データを取得
     $BlogPostModel = ClassRegistry::init('Blog.BlogPost');
     $blogPostDatas = $BlogPostModel->find('list', array('recursive' => -1));
     // プチ・ブログカスタムフィールド設定データを取得
     $dataList = $this->PetitBlogCustomField->find('all', array('recursive' => -1));
     // カスタムフィールドのデータ数よりブログ記事データの方が多ければ、メニューを表示する
     if (count($blogPostDatas) > count($dataList)) {
         $message .= '「プチ・ブログカスタムフィールド一括設定」にてプチ・ブログカスタムフィールド用のデータを作成して下さい。';
     } else {
         $judgePetitBlogCustomFieldUse = true;
     }
     $this->set('judgePetitBlogCustomFieldConfigUse', $judgePetitBlogCustomFieldConfigUse);
     $this->set('judgePetitBlogCustomFieldUse', $judgePetitBlogCustomFieldUse);
     if (!$judgePetitBlogCustomFieldConfigUse) {
         $this->setMessage($message, true);
     }
     $this->set('customFieldConfig', Configure::read('petitBlogCustomField'));
 }
Example #3
0
 /**
  * beforeFilter
  *
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     // ブログ情報を取得
     $BlogContentModel = ClassRegistry::init('Blog.BlogContent');
     $this->blogContentDatas = $BlogContentModel->find('list', array('recursive' => -1));
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow('login', 'signup', 'activate', 'reset_password');
     $this->Auth->authenticate = array('Form' => array('userModel' => 'Members.Mypage', 'scope' => array('Mypage.status' => 0)));
     //ログイン画面:デフォルトだとUserControllerになってしまうので強制的に変更する。
     $this->Auth->loginAction = array('controller' => 'mypages', 'action' => 'login');
     $this->Auth->loginRedirect = array('controller' => 'mypages', 'action' => 'index');
     //$this->BcAuth->logoutRedirect = array( 'controller' => 'Mypages', 'action' => 'logout');
     if (preg_match('/^admin_/', $this->action)) {
         $this->subMenuElements = array('members');
     }
 }
Example #5
0
 /**
  * beforeFilter
  *
  * @return	void
  * @access 	public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $user = $this->BcAuth->user();
     if (!$user) {
         return;
     }
     $newCatAddable = $this->BlogCategory->checkNewCategoryAddable($user['user_group_id'], $this->checkRootEditable());
     $this->set('newCatAddable', $newCatAddable);
 }
 /**
  * beforeFilter
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     $migrator = 'BcAddonMigrator' . $this->getMajorVersion();
     $this->{$migrator} = $this->Components->load('BcAddonMigrator.' . $migrator);
 }
 /**
  * beforeFilter
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     // 認証設定
     $this->BcAuth->allow('ajax_keyword');
 }
 /**
  * beforeFilter
  *
  * @return	void
  * @access 	public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->set('user', $this->Auth->user());
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     BurgerEditorHelper::setSelfValue();
     $this->set("addonDir", dirname(dirname(__FILE__)) . DS . 'Addon' . DS);
 }