GeneralController::baseVariables()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 5
cp 0
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/organization/license
6
 * @link       https://www.flipboxfactory.com/software/organization/
7
 */
8
9
namespace flipbox\organization\modules\configuration\controllers\view;
10
11
/**
12
 * @author Flipbox Factory <[email protected]>
13
 * @since 1.0.0
14
 */
15
class GeneralController extends AbstractController
16
{
17
18
    /**
19
     * The index view template path
20
     */
21
    const TEMPLATE_INDEX = AbstractController::TEMPLATE_BASE . DIRECTORY_SEPARATOR . 'general';
22
23
    /**
24
     * Index
25
     *
26
     * @return string
27
     */
28
    public function actionIndex()
29
    {
30
31
        // Empty variables for template
32
        $variables = [];
33
34
        // apply base view variables
35
        $this->baseVariables($variables);
36
37
        // Full page form in the CP
38
        $variables['fullPageForm'] = true;
39
40
        return $this->renderTemplate(static::TEMPLATE_INDEX, $variables);
41
    }
42
43
44
    /*******************************************
45
     * VARIABLES
46
     *******************************************/
47
48
    /**
49
     * @inheritdoc
50
     */
51
    protected function baseVariables(array &$variables = [])
52
    {
53
54
        // Get base variables
55
        parent::baseVariables($variables);
56
57
        // Path to controller actions
58
        $variables['baseActionPath'] .= '/general';
59
    }
60
}
61