src/Entity/TeamMember.php line 30

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\LinkTrait;
  4. use App\Entity\Traits\MetaTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Entity\Traits\ActiveTrait;
  7. use App\Entity\Traits\DeleteTrait;
  8. use App\Entity\Traits\SortOrderTrait;
  9. use App\Entity\Traits\TranslateTrait;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use App\Entity\Traits\ImageUploadTrait;
  12. use App\Entity\Traits\SitemapableTrait;
  13. use App\Entity\Traits\TitleAndContentTrait;
  14. use App\Entity\Traits\SecondImageUploadTrait;
  15. use App\Entity\Interfaces\DefaultLinkedEntity;
  16. use Gedmo\Timestampable\Traits\TimestampableEntity;
  17. use Symfony\Component\Validator\Constraints as Assert;
  18. /**
  19. * MeetTheTeam.
  20. *
  21. * @Gedmo\Loggable
  22. *
  23. * @Gedmo\TranslationEntity(class="App\Entity\TeamMemberTranslations")
  24. */
  25. #[ORM\Entity(repositoryClass: \App\Repository\MeetTheTeamRepository::class)]
  26. #[ORM\Table(name: 'meettheteam')]
  27. class TeamMember implements DefaultLinkedEntity
  28. {
  29. use TitleAndContentTrait;
  30. use LinkTrait;
  31. use MetaTrait;
  32. use ActiveTrait;
  33. use DeleteTrait;
  34. use ImageUploadTrait;
  35. use SecondImageUploadTrait;
  36. use SortOrderTrait;
  37. use TimestampableEntity;
  38. use TranslateTrait;
  39. use SitemapableTrait;
  40. #[ORM\Column(name: 'id', type: 'integer')]
  41. #[ORM\Id]
  42. #[ORM\GeneratedValue(strategy: 'AUTO')]
  43. private int $id;
  44. /**
  45. * @Gedmo\Translatable
  46. */
  47. #[Assert\NotBlank(message: 'The position should not be blank')]
  48. #[ORM\Column(name: 'position', type: 'string', length: 255)]
  49. private ?string $position = null;
  50. #[ORM\Column(type: 'text', nullable: true)]
  51. private $content2;
  52. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  53. private $telephone;
  54. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  55. private $emailAddress;
  56. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  57. private $linkedIn;
  58. #[ORM\Column(type: 'text', nullable: true)]
  59. private $education;
  60. #[ORM\Column(type: 'text', nullable: true)]
  61. private $keySkills;
  62. #[ORM\Column(type: 'text', nullable: true)]
  63. private $professionalInterests;
  64. #[ORM\Column(type: 'text', nullable: true)]
  65. private $nickname;
  66. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  67. private $favouriteMeal;
  68. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  69. private $favouriteDrink;
  70. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  71. private $favouriteFilm;
  72. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  73. private $favouriteBand;
  74. #[ORM\Column(type: 'boolean')]
  75. private $featured;
  76. /**
  77. * Get id.
  78. */
  79. public function getId(): int
  80. {
  81. return $this->id;
  82. }
  83. /**
  84. * Set position.
  85. *
  86. * @param string $position
  87. */
  88. public function setPosition($position): self
  89. {
  90. $this->position = $position;
  91. return $this;
  92. }
  93. /**
  94. * Get position.
  95. */
  96. public function getPosition(): ?string
  97. {
  98. return $this->position;
  99. }
  100. // REQUIRED BY THE LINKS TRAIT
  101. public function getLinkedPageId(): int
  102. {
  103. return 5;
  104. }
  105. public function getContent2(): ?string
  106. {
  107. return $this->content2;
  108. }
  109. public function setContent2(?string $content2): self
  110. {
  111. $this->content2 = $content2;
  112. return $this;
  113. }
  114. public function getTelephone(): ?string
  115. {
  116. return $this->telephone;
  117. }
  118. public function setTelephone(?string $telephone): self
  119. {
  120. $this->telephone = $telephone;
  121. return $this;
  122. }
  123. public function getEmailAddress(): ?string
  124. {
  125. return $this->emailAddress;
  126. }
  127. public function setEmailAddress(?string $emailAddress): self
  128. {
  129. $this->emailAddress = $emailAddress;
  130. return $this;
  131. }
  132. public function getLinkedIn(): ?string
  133. {
  134. return $this->linkedIn;
  135. }
  136. public function setLinkedIn(?string $linkedIn): self
  137. {
  138. $this->linkedIn = $linkedIn;
  139. return $this;
  140. }
  141. public function getEducation(): ?string
  142. {
  143. return $this->education;
  144. }
  145. public function setEducation(?string $education): self
  146. {
  147. $this->education = $education;
  148. return $this;
  149. }
  150. public function getKeySkills(): ?string
  151. {
  152. return $this->keySkills;
  153. }
  154. public function setKeySkills(?string $keySkills): self
  155. {
  156. $this->keySkills = $keySkills;
  157. return $this;
  158. }
  159. public function getProfessionalInterests(): ?string
  160. {
  161. return $this->professionalInterests;
  162. }
  163. public function setProfessionalInterests(?string $professionalInterests): self
  164. {
  165. $this->professionalInterests = $professionalInterests;
  166. return $this;
  167. }
  168. public function getNickname(): ?string
  169. {
  170. return $this->nickname;
  171. }
  172. public function setNickname(?string $nickname): self
  173. {
  174. $this->nickname = $nickname;
  175. return $this;
  176. }
  177. public function getFavouriteMeal(): ?string
  178. {
  179. return $this->favouriteMeal;
  180. }
  181. public function setFavouriteMeal(?string $favouriteMeal): self
  182. {
  183. $this->favouriteMeal = $favouriteMeal;
  184. return $this;
  185. }
  186. public function getFavouriteDrink(): ?string
  187. {
  188. return $this->favouriteDrink;
  189. }
  190. public function setFavouriteDrink(?string $favouriteDrink): self
  191. {
  192. $this->favouriteDrink = $favouriteDrink;
  193. return $this;
  194. }
  195. public function getFavouriteFilm(): ?string
  196. {
  197. return $this->favouriteFilm;
  198. }
  199. public function setFavouriteFilm(?string $favouriteFilm): self
  200. {
  201. $this->favouriteFilm = $favouriteFilm;
  202. return $this;
  203. }
  204. public function getFavouriteBand(): ?string
  205. {
  206. return $this->favouriteBand;
  207. }
  208. public function setFavouriteBand(?string $favouriteBand): self
  209. {
  210. $this->favouriteBand = $favouriteBand;
  211. return $this;
  212. }
  213. public function getFeatured(): ?bool
  214. {
  215. return $this->featured;
  216. }
  217. public function setFeatured(bool $featured): self
  218. {
  219. $this->featured = $featured;
  220. return $this;
  221. }
  222. public function getSitemapRouteParams(): array
  223. {
  224. return ['slug' => $this->getSlug()];
  225. }
  226. public function isIncludedInSitemap(): bool
  227. {
  228. return $this->isActive() &&
  229. ! $this->isDeleted();
  230. }
  231. }