Completed
Push — master ( 6064a2...7a17c2 )
by Luis Ramón
02:25
created

TaskPermission::getTask()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2017: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity\Documentation;
22
23
use AppBundle\Entity\Element;
24
use Doctrine\ORM\Mapping as ORM;
25
26
/**
27
 * @ORM\Entity()
28
 * @ORM\Table(name="documentation_task_permission")
29
 */
30
class TaskPermission
31
{
32
    /**
33
     * @ORM\Id()
34
     * @ORM\ManyToOne(targetEntity="Task", inversedBy="permissions")
35
     * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
36
     * @var Task
37
     */
38
    private $task;
39
40
    /**
41
     * @ORM\Id()
42
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Element")
43
     * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
44
     * @var Element
45
     */
46
    private $element;
47
48
    /**
49
     * @ORM\Id()
50
     * @ORM\Column(type="integer", nullable=false)
51
     * @var int
52
     */
53
    private $permission;
54
55
    /**
56
     * Set permission
57
     *
58
     * @param integer $permission
59
     *
60
     * @return TaskPermission
61
     */
62
    public function setPermission($permission)
63
    {
64
        $this->permission = $permission;
65
66
        return $this;
67
    }
68
69
    /**
70
     * Get permission
71
     *
72
     * @return integer
73
     */
74
    public function getPermission()
75
    {
76
        return $this->permission;
77
    }
78
79
    /**
80
     * Set task
81
     *
82
     * @param Task $task
83
     *
84
     * @return TaskPermission
85
     */
86
    public function setTask(Task $task)
87
    {
88
        $this->task = $task;
89
90
        return $this;
91
    }
92
93
    /**
94
     * Get task
95
     *
96
     * @return Task
97
     */
98
    public function getTask()
99
    {
100
        return $this->task;
101
    }
102
103
    /**
104
     * Set element
105
     *
106
     * @param Element $element
107
     *
108
     * @return TaskPermission
109
     */
110
    public function setElement(Element $element)
111
    {
112
        $this->element = $element;
113
114
        return $this;
115
    }
116
117
    /**
118
     * Get element
119
     *
120
     * @return Element
121
     */
122
    public function getElement()
123
    {
124
        return $this->element;
125
    }
126
}
127