AdminAppController::beforeFilter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace Admin\Controller;
14
15
use App\Controller\AppController;
16
use Cake\Event\Event;
17
18
class AdminAppController extends AppController
19
{
20
    public $helpers = [
21
        'Admin.Admin',
22
        // Bootstrap-UI-plugin helpers overwrite default Cake helpers
23
        'Html' => ['className' => 'BootstrapUI.Html'],
24
        'Form' => ['className' => 'BootstrapUI.Form'],
25
        'Flash' => ['className' => 'BootstrapUI.Flash'],
26
        'Paginator' => ['className' => 'BootstrapUI.Paginator'],
27
        'Breadcrumbs' => ['className' => 'BootstrapUI.Breadcrumbs'],
28
    ];
29
30
    /**
31
     * {@inheritDoc}
32
     */
33
    public function beforeFilter(Event $event)
34
    {
35
        parent::beforeFilter($event);
36
        $this->viewBuilder()->setLayout('Admin.admin');
37
    }
38
}
39