Passed
Push — master ( 7dce27...7fa20f )
by Yannick
08:15
created

PageLayoutTemplate::getLayout()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use ApiPlatform\Metadata\ApiResource;
10
use Symfony\Component\Serializer\Annotation\Groups;
11
use Doctrine\ORM\Mapping as ORM;
12
13
#[ApiResource(
14
    normalizationContext: ['groups' => ['page_layout_template:read']],
15
    denormalizationContext: ['groups' => ['page_layout_template:write']]
16
)]
17
#[ORM\Table(name: 'page_layout_template')]
18
#[ORM\Entity]
19
class PageLayoutTemplate
20
{
21
    #[Groups(['page_layout_template:read'])]
22
    #[ORM\Id]
23
    #[ORM\GeneratedValue]
24
    #[ORM\Column(type: 'integer')]
25
    private ?int $id = null;
26
27
    #[Groups(['page_layout_template:read', 'page_layout_template:write'])]
28
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
29
    private ?string $name = null;
30
31
    #[Groups(['page_layout_template:read', 'page_layout_template:write'])]
32
    #[ORM\Column(type: 'text')]
33
    private string $layout;
34
35
    public function getId(): ?int
36
    {
37
        return $this->id;
38
    }
39
40
    public function getName(): ?string
41
    {
42
        return $this->name;
43
    }
44
45
    public function setName(?string $name): self
46
    {
47
        $this->name = $name;
48
        return $this;
49
    }
50
51
    public function getLayout(): string
52
    {
53
        return $this->layout;
54
    }
55
56
    public function setLayout(string $layout): self
57
    {
58
        $this->layout = $layout;
59
60
        return $this;
61
    }
62
}
63