Traq\Controllers\Admin\AppController::__construct PHP 메소드

__construct() 공개 메소드

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        $this->addCrumb($this->translate('admincp'), $this->generateUrl('admincp'));
        // Admins only, kthnxbai
        if (!$this->currentUser || !$this->currentUser->isAdmin()) {
            $this->before('*', function () {
                return $this->show403();
            });
        }
    }

Usage Example

예제 #1
0
파일: Settings.php 프로젝트: nirix/traq
 public function __construct()
 {
     parent::__construct();
     $this->addCrumb($this->translate('settings'), $this->generateUrl('admin_settings'));
     // Ticket history sorting select options
     $this->set('historySortingSelectOptions', [['label' => $this->translate("oldest_first"), 'value' => "oldest_first"], ['label' => $this->translate("newest_first"), 'value' => "newest_first"]]);
     Themes::index();
     $this->set('themes', Themes::selectOptions());
 }
All Usage Examples Of Traq\Controllers\Admin\AppController::__construct
AppController