Page   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 41
c 0
b 0
f 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getSubnav() 0 4 1
A setSubnav() 0 4 1
A isHidden() 0 4 2
1
<?php
2
3
/**
4
 * @author    Markus Tacker <[email protected]>
5
 * @copyright 2013-2016 Verein zur Förderung der Netzkultur im Rhein-Main-Gebiet e.V. | http://netzkultur-rheinmain.de/
6
 */
7
8
namespace BCRM\WebBundle\Content;
9
10
use BCRM\BackendBundle\Content\Info;
11
use Doctrine\Common\Collections\ArrayCollection;
12
13
class Page extends Info
14
{
15
    /**
16
     * @var \Doctrine\Common\Collections\ArrayCollection
17
     */
18
    protected $subnav;
19
20
    public function __construct()
21
    {
22
        $this->subnav     = new ArrayCollection();
23
        $this->properties = new ArrayCollection(
24
            array('subnav' => 1)
25
        );
26
    }
27
28
    /**
29
     * @return \Doctrine\Common\Collections\ArrayCollection
30
     */
31
    public function getSubnav()
32
    {
33
        return $this->subnav;
34
    }
35
36
    /**
37
     * @param \Doctrine\Common\Collections\ArrayCollection $subnav
38
     */
39
    public function setSubnav($subnav)
40
    {
41
        $this->subnav = $subnav;
42
    }
43
44
    /**
45
     * Returns whether this page should not be displayed.
46
     * 
47
     * @return bool
48
     */
49
    public function isHidden()
50
    {
51
        return $this->getProperties()->containsKey('hidden') && $this->getProperties()->get('hidden') == 1;
52
    }
53
}
54