本文整理汇总了PHP中App\Controller\AppController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AppController::__construct方法的具体用法?PHP AppController::__construct怎么用?PHP AppController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App\Controller\AppController
的用法示例。
在下文中一共展示了AppController::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
{
parent::__construct($request, $response, $name, $eventManager, $components);
$this->set('title', 'Caixa Movimentos');
$this->set('bt_consultar_acao', false);
$this->set('bt_cadastrar_acao', false);
$this->set('bt_excluir_acao', false);
}
示例2: __construct
public function __construct()
{
parent::__construct();
$app = App::getInstance();
$auth = new DBAuth($app->getDb());
if (!$auth->logged()) {
$this->forbidden();
}
}
示例3: __construct
public function __construct(\Core\Request $request, \Core\Session $session, \Core\Auth $auth)
{
parent::__construct($request, $session, $auth);
$this->layout = 'painel';
$this->set('titulo', 'Título não Informado');
if (!$this->Auth->check()) {
$this->redirect('/home/logout');
}
}
示例4: __construct
public function __construct()
{
parent::__construct();
$app = App::getInstance();
$auth = new DBAuth($app->getDb());
if (!$auth->logged()) {
$this->forbidden();
}
/*$logged = false;
$this->render('templates.default', compact('logged'));*/
}
示例5: __construct
/**
* Constructor
*
* @param \Cake\Network\Request|null $request Request instance.
* @param \Cake\Network\Response|null $response Response instance.
*/
public function __construct($request = null, $response = null)
{
parent::__construct($request, $response);
if (count(Router::extensions()) && !isset($this->RequestHandler)) {
$this->loadComponent('RequestHandler');
}
$eventManager = $this->eventManager();
if (isset($this->Auth)) {
$eventManager->off($this->Auth);
}
if (isset($this->Security)) {
$eventManager->off($this->Security);
}
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->loadModel('Post');
$this->loadModel('Category');
}
示例7: __construct
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
{
parent::__construct($request, $response, $name, $eventManager, $components);
$this->set('title', 'Grupos');
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->loadModel('Actuality');
}
示例9: __construct
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
{
parent::__construct($request, $response, $name, $eventManager, $components);
$this->set('title', 'Vendedores');
$this->loadModel('Pessoas');
}
示例10: __construct
public function __construct(\Core\Request $request, \Core\Session $session, \Core\Auth $auth)
{
parent::__construct($request, $session, $auth);
$this->loadModel('Produtos');
}
示例11: __construct
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null, $components = null)
{
parent::__construct($request, $response, $name, $eventManager, $components);
$this->set(['menu' => $this->menu, 'currentPageName' => $this->request->here]);
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->loadModel(['Users', 'Posts']);
}
示例13: __construct
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, $name = null, $eventManager = null)
{
parent::__construct($request, $response, $name, $eventManager);
debug('thing');
}