Total Complexity | 5 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | trait EventCollectiveTrait |
||
11 | { |
||
12 | /** |
||
13 | * @var AgendaEventInvitation|null |
||
14 | * |
||
15 | * @ORM\OneToOne( |
||
16 | * targetEntity="Chamilo\CoreBundle\Entity\AgendaEventInvitation", |
||
17 | * cascade={"persist", "remove"}, |
||
18 | * orphanRemoval=true |
||
19 | * ) |
||
20 | * @ORM\JoinColumn(name="agenda_event_invitation_id", referencedColumnName="id", onDelete="CASCADE") |
||
21 | */ |
||
22 | protected $invitation; |
||
23 | |||
24 | /** |
||
25 | * @ORM\Column(name="collective", type="boolean", nullable=false) |
||
26 | */ |
||
27 | protected $collective = false; |
||
28 | |||
29 | public function hasInvitation(): bool |
||
30 | { |
||
31 | return $this->invitation instanceof AgendaEventInvitation; |
||
32 | } |
||
33 | |||
34 | public function getInvitation(): ?AgendaEventInvitation |
||
35 | { |
||
36 | return $this->invitation; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function setInvitation(AgendaEventInvitation $invitation) |
||
43 | { |
||
44 | $this->invitation = $invitation; |
||
45 | |||
46 | return $this; |
||
47 | } |
||
48 | |||
49 | public function isCollective(): bool |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function setCollective(bool $collective) |
||
64 |