Contao\Backend::__construct PHP Method

__construct() protected method

Load the database object
protected __construct ( )
    protected function __construct()
    {
        parent::__construct();
        $this->import('Database');
        $this->setStaticUrls();
    }

Usage Example

Example #1
0
 /**
  * Initialize the controller
  *
  * 1. Import the user
  * 2. Call the parent constructor
  * 3. Authenticate the user
  * 4. Load the language files
  * DO NOT CHANGE THIS ORDER!
  */
 public function __construct()
 {
     $this->import('BackendUser', 'User');
     parent::__construct();
     $this->User->authenticate();
     \System::loadLanguageFile('default');
 }
All Usage Examples Of Contao\Backend::__construct