Example #1
0
 public function initialize()
 {
     parent::initialize();
     if (!self::isNationWideBid()) {
         $this->pageError('permission');
     }
 }
Example #2
0
 /**
  * Initialize this controller.
  *
  * @return void
  */
 protected function initialize()
 {
     // initialize parent
     parent::initialize();
     // set our content type
     $this->contentType = $this->getContext()->getRequest()->getParameter('ctype', MO_CONTENT_TYPE);
 }
Example #3
0
 /**
  * Overriding parent
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->view->addJs('rest');
     if ($this->request->getMethod() != 'GET') {
         $this->view->enableRendering(false);
     }
 }
Example #4
0
 public function initialize()
 {
     parent::initialize();
     $action = $this->getActionName();
     if ($this->isAjax() and in_array($action, ['face', 'visit', 'car', 'reface'])) {
         //if ($this->checkLoanStatus($uid, $action))
         //	$this->error('该贷款状态下不能操作');
     }
 }
Example #5
0
 /**
  * test initialize() method
  *
  * @test
  */
 public function initialize()
 {
     $configMethods = array_keys(get_class_vars('ApiComponent')['configMethods']);
     $this->generateComponent(['mocks' => ['Api' => array_merge($configMethods, ['isApiRequest'])], 'initialize' => false]);
     $this->Api->expects($this->once())->method('isApiRequest')->will($this->returnValue(true));
     foreach ($configMethods as $configMethod) {
         $this->Api->expects($this->once())->method($configMethod);
     }
     $this->Api->initialize($this->controller);
 }
Example #6
0
 public function initialize()
 {
     parent::initialize();
     $this->noMainLayout();
 }
Example #7
0
 public function initialize()
 {
     parent::initialize();
     $this->afterRcAuthes();
 }
Example #8
0
 public function initialize()
 {
     parent::initialize();
     $this->set('current_user', $this->Auth->user());
 }