‪TYPO3CMS  10.4
Person.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 
25 {
29  protected ‪$firstname = '';
30 
34  protected ‪$lastname = '';
35 
39  protected ‪$email = '';
40 
44  protected ‪$tags;
45 
49  protected ‪$tagsSpecial;
50 
55  {
58  $this->‪setEmail(‪$email);
59 
60  $this->tags = new ‪ObjectStorage();
61  $this->tagsSpecial = new ‪ObjectStorage();
62  }
63 
69  public function ‪setFirstname(‪$firstname)
70  {
71  $this->firstname = ‪$firstname;
72  }
73 
79  public function ‪getFirstname()
80  {
81  return ‪$this->firstname;
82  }
83 
89  public function ‪setLastname(‪$lastname)
90  {
91  $this->lastname = ‪$lastname;
92  }
93 
99  public function ‪getLastname()
100  {
101  return ‪$this->lastname;
102  }
103 
109  public function ‪getFullName()
110  {
111  return $this->firstname . ' ' . ‪$this->lastname;
112  }
113 
119  public function ‪setEmail(‪$email)
120  {
121  $this->email = ‪$email;
122  }
123 
129  public function ‪getEmail()
130  {
131  return ‪$this->email;
132  }
133 
137  public function ‪getTags()
138  {
139  return ‪$this->tags;
140  }
141 
145  public function ‪setTags(‪ObjectStorage ‪$tags)
146  {
147  $this->tags = ‪$tags;
148  }
149 
153  public function ‪addTag(‪Tag $tag)
154  {
155  $this->tags->attach($tag);
156  }
157 
161  public function ‪removeTag(‪Tag $tag)
162  {
163  $this->tags->detach($tag);
164  }
165 
169  public function ‪getTagsSpecial()
170  {
171  return ‪$this->tagsSpecial;
172  }
173 
178  {
179  $this->tagsSpecial = ‪$tagsSpecial;
180  }
181 
185  public function ‪addTagSpecial(‪Tag $tag)
186  {
187  $this->tagsSpecial->attach($tag);
188  }
189 
193  public function ‪removeTagSpecial(‪Tag $tag)
194  {
195  $this->tagsSpecial->detach($tag);
196  }
197 }
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getFirstname
‪string getFirstname()
Definition: Person.php:74
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$email
‪string $email
Definition: Person.php:36
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setEmail
‪setEmail($email)
Definition: Person.php:114
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getEmail
‪string getEmail()
Definition: Person.php:124
‪ExtbaseTeam\BlogExample\Domain\Model\Person\removeTagSpecial
‪removeTagSpecial(Tag $tag)
Definition: Person.php:188
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$firstname
‪string $firstname
Definition: Person.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getFullName
‪string getFullName()
Definition: Person.php:104
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$tags
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Tag > $tags
Definition: Person.php:40
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪ExtbaseTeam\BlogExample\Domain\Model\Person\addTag
‪addTag(Tag $tag)
Definition: Person.php:148
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setFirstname
‪setFirstname($firstname)
Definition: Person.php:64
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getTags
‪TYPO3 CMS Extbase Persistence ObjectStorage ExtbaseTeam BlogExample Domain Model Tag[] getTags()
Definition: Person.php:132
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getTagsSpecial
‪TYPO3 CMS Extbase Persistence ObjectStorage ExtbaseTeam BlogExample Domain Model Tag[] getTagsSpecial()
Definition: Person.php:164
‪ExtbaseTeam\BlogExample\Domain\Model\Person\removeTag
‪removeTag(Tag $tag)
Definition: Person.php:156
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setLastname
‪setLastname($lastname)
Definition: Person.php:84
‪ExtbaseTeam\BlogExample\Domain\Model\Person\__construct
‪__construct($firstname, $lastname, $email)
Definition: Person.php:49
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$lastname
‪string $lastname
Definition: Person.php:32
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setTagsSpecial
‪setTagsSpecial(ObjectStorage $tagsSpecial)
Definition: Person.php:172
‪ExtbaseTeam\BlogExample\Domain\Model\Person\addTagSpecial
‪addTagSpecial(Tag $tag)
Definition: Person.php:180
‪ExtbaseTeam\BlogExample\Domain\Model\Person\$tagsSpecial
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Tag > $tagsSpecial
Definition: Person.php:44
‪ExtbaseTeam\BlogExample\Domain\Model\Person
Definition: Person.php:25
‪ExtbaseTeam\BlogExample\Domain\Model\Person\setTags
‪setTags(ObjectStorage $tags)
Definition: Person.php:140
‪ExtbaseTeam\BlogExample\Domain\Model\Person\getLastname
‪string getLastname()
Definition: Person.php:94
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:16
‪ExtbaseTeam\BlogExample\Domain\Model\Tag
Definition: Tag.php:24