Completed
Push — master ( 7171ca...80a1b3 )
by Tomáš
06:18
created

PageSection::setOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Webcook\Cms\CoreBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Serializer\Annotation\MaxDepth;
7
use ApiPlatform\Core\Annotation\ApiProperty;
8
9
/**
10
 * Page section entity.
11
 *
12
 * @ORM\Entity
13
 * @ORM\Table(name="PageSection")
14
 */
15
class PageSection
16
{
17
    /**
18
     * @ORM\Column(name="id", type="integer", nullable=false)
19
     * @ORM\Id()
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    protected $id;
23
24
    /**
25
     * @ORM\ManyToOne(targetEntity="Page", inversedBy="sections")
26
     * @ORM\JoinColumn(name="page_id", referencedColumnName="id")
27
     * @MaxDepth(5)
28
     * @ApiProperty(readable = false)
29
     */
30
    private $page;
31
32
    /**
33
     *
34
     * @ORM\ManyToOne(targetEntity="Section")
35
     * @ORM\JoinColumn(name="section_id", referencedColumnName="id")
36
     * @MaxDepth(2)
37
     * @ApiProperty(readable = false)
38
     */
39
    private $section;
40
41
    /**
42
     * @ORM\ManyToOne(targetEntity="ContentProvider")
43
     * @ORM\JoinColumn(name="content_provider_id", referencedColumnName="id")
44
     * @MaxDepth(2)
45
     * @ApiProperty(readable = false)
46
     */
47
    private $contentProvider;
48
49
    /**
50
     * @ORM\Column(name="content_order", type="integer")
51
     */
52
    private $order;
53
54
    /**
55
     * Gets the value of id.
56
     *
57
     * @return mixed
58
     */
59
    public function getId()
60
    {
61
        return $this->id;
62
    }
63
64
    /**
65
     * Gets the value of order.
66
     *
67
     * @return mixed
68
     */
69 2
    public function getOrder()
70
    {
71 2
        return $this->order;
72
    }
73
74
    /**
75
     * Sets the value of order.
76
     *
77
     * @param mixed $order the order
78
     *
79
     * @return self
80
     */
81 20
    public function setOrder($order)
82
    {
83 20
        $this->order = $order;
84
85 20
        return $this;
86
    }
87
88
    /**
89
     * Gets the value of page.
90
     *
91
     * @return mixed
92
     */
93
    public function getPage()
94
    {
95
        return $this->page;
96
    }
97
98
    /**
99
     * Sets the value of page.
100
     *
101
     * @param mixed $page the page
102
     *
103
     * @return self
104
     */
105 20
    public function setPage($page)
106
    {
107 20
        $this->page = $page;
108
109 20
        return $this;
110
    }
111
112
    /**
113
     * Gets the value of section.
114
     *
115
     * @return mixed
116
     */
117 3
    public function getSection()
118
    {
119 3
        return $this->section;
120
    }
121
122
    /**
123
     * Sets the value of section.
124
     *
125
     * @param mixed $section the section
126
     *
127
     * @return self
128
     */
129 20
    public function setSection($section)
130
    {
131 20
        $this->section = $section;
132
133 20
        return $this;
134
    }
135
136
    /**
137
     * Gets the value of contentProvider.
138
     *
139
     * @return mixed
140
     */
141 2
    public function getContentProvider()
142
    {
143 2
        return $this->contentProvider;
144
    }
145
146
    /**
147
     * Sets the value of contentProvider.
148
     *
149
     * @param mixed $contentProvider the content provider
150
     *
151
     * @return self
152
     */
153 20
    public function setContentProvider($contentProvider)
154
    {
155 20
        $this->contentProvider = $contentProvider;
156
157 20
        return $this;
158
    }
159
}
160