‪TYPO3CMS  9.5
Person.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
25  protected ‪$firstname = '';
26 
30  protected ‪$lastname = '';
31 
35  protected ‪$email = '';
36 
40  protected ‪$tags;
41 
45  protected ‪$tagsSpecial;
46 
51  {
54  $this->‪setEmail(‪$email);
55 
56  $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
57  $this->tagsSpecial = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
58  }
59 
65  public function ‪setFirstname(‪$firstname)
66  {
67  $this->firstname = ‪$firstname;
68  }
69 
75  public function ‪getFirstname()
76  {
77  return ‪$this->firstname;
78  }
79 
85  public function ‪setLastname(‪$lastname)
86  {
87  $this->lastname = ‪$lastname;
88  }
89 
95  public function ‪getLastname()
96  {
97  return ‪$this->lastname;
98  }
99 
105  public function ‪getFullName()
106  {
107  return $this->firstname . ' ' . ‪$this->lastname;
108  }
109 
115  public function ‪setEmail(‪$email)
116  {
117  $this->email = ‪$email;
118  }
119 
125  public function ‪getEmail()
126  {
127  return ‪$this->email;
128  }
129 
133  public function ‪getTags()
134  {
135  return ‪$this->tags;
136  }
137 
141  public function ‪setTags(\‪TYPO3\CMS\‪Extbase\Persistence\ObjectStorage ‪$tags)
142  {
143  $this->tags = ‪$tags;
144  }
145 
149  public function ‪addTag(‪Tag $tag)
150  {
151  $this->tags->attach($tag);
152  }
153 
157  public function ‪removeTag(‪Tag $tag)
158  {
159  $this->tags->detach($tag);
160  }
161 
165  public function ‪getTagsSpecial()
166  {
167  return ‪$this->tagsSpecial;
168  }
169 
173  public function ‪setTagsSpecial(\‪TYPO3\CMS\‪Extbase\Persistence\ObjectStorage ‪$tagsSpecial)
174  {
175  $this->tagsSpecial = ‪$tagsSpecial;
176  }
177 
181  public function ‪addTagSpecial(‪Tag $tag)
182  {
183  $this->tagsSpecial->attach($tag);
184  }
185 
189  public function ‪removeTagSpecial(‪Tag $tag)
190  {
191  $this->tagsSpecial->detach($tag);
192  }
193 }
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getFirstname
‪string getFirstname()
Definition: Person.php:70
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setTagsSpecial
‪setTagsSpecial(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $tagsSpecial)
Definition: Person.php:168
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$email
‪string $email
Definition: Person.php:32
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setEmail
‪setEmail($email)
Definition: Person.php:110
‪TYPO3
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getEmail
‪string getEmail()
Definition: Person.php:120
‪ExtbaseTeam\BlogExample\Domain\Model\Person\removeTagSpecial
‪removeTagSpecial(Tag $tag)
Definition: Person.php:184
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$firstname
‪string $firstname
Definition: Person.php:24
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getFullName
‪string getFullName()
Definition: Person.php:100
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$tags
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Tag > $tags
Definition: Person.php:36
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:22
‪ExtbaseTeam\BlogExample\Domain\Model\Person\addTag
‪addTag(Tag $tag)
Definition: Person.php:144
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setFirstname
‪setFirstname($firstname)
Definition: Person.php:60
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setTags
‪setTags(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $tags)
Definition: Person.php:136
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getTags
‪TYPO3 CMS Extbase Persistence ObjectStorage ExtbaseTeam BlogExample Domain Model Tag[] getTags()
Definition: Person.php:128
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getTagsSpecial
‪TYPO3 CMS Extbase Persistence ObjectStorage ExtbaseTeam BlogExample Domain Model Tag[] getTagsSpecial()
Definition: Person.php:160
‪ExtbaseTeam\BlogExample\Domain\Model\Person\removeTag
‪removeTag(Tag $tag)
Definition: Person.php:152
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setLastname
‪setLastname($lastname)
Definition: Person.php:80
‪ExtbaseTeam\BlogExample\Domain\Model\Person\__construct
‪__construct($firstname, $lastname, $email)
Definition: Person.php:45
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$lastname
‪string $lastname
Definition: Person.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\Person\addTagSpecial
‪addTagSpecial(Tag $tag)
Definition: Person.php:176
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$tagsSpecial
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Tag > $tagsSpecial
Definition: Person.php:40
‪ExtbaseTeam\BlogExample\Domain\Model\Person
Definition: Person.php:21
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getLastname
‪string getLastname()
Definition: Person.php:90
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:3
‪ExtbaseTeam\BlogExample\Domain\Model\Tag
Definition: Tag.php:21