Completed
Push — fetcher_factories ( 10a56f...fd93ea )
by David
13:44
created

SplashViewUrlsController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 1
c 5
b 0
f 0
lcom 1
cbo 1
dl 0
loc 37
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaultAction() 0 11 1
1
<?php
2
3
namespace Mouf\Mvc\Splash\Controllers\Admin;
4
5
use Mouf\InstanceProxy;
6
use Mouf\Mvc\Splash\Controllers\Controller;
7
8
/**
9
 * The controller that will display all the URLs managed by Splash.
10
 *
11
 * @Component
12
 */
13
class SplashViewUrlsController extends Controller
14
{
15
    /**
16
     * The template used by the Splash page.
17
     *
18
     * @Property
19
     * @Compulsory
20
     *
21
     * @var TemplateInterface
22
     */
23
    public $template;
24
25
    /**
26
     * @var HtmlBlock
27
     */
28
    public $content;
29
30
    protected $splashUrlsList;
31
    protected $selfedit;
32
33
    /**
34
     * Displays the config page.
35
     *
36
     * @Action
37
     */
38
    public function defaultAction($selfedit = 'false')
39
    {
40
        $this->selfedit = $selfedit;
41
42
        $instance = new InstanceProxy('splashDefaultRouter');
43
44
        $this->splashUrlsList = $instance->getSplashActionsList();
45
46
        $this->content->addFile(dirname(__FILE__).'/../../../../../views/admin/splashUrlsList.php', $this);
47
        $this->template->toHtml();
48
    }
49
}
50