GeneralController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 46
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 14 1
A baseVariables() 0 9 1
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