vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Entity/Fax.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of Sulu.
  4. *
  5. * (c) Sulu GmbH
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Sulu\Bundle\ContactBundle\Entity;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use JMS\Serializer\Annotation\Exclude;
  14. use JMS\Serializer\Annotation\Groups;
  15. /**
  16. * Fax.
  17. */
  18. class Fax
  19. {
  20. /**
  21. * @var string
  22. */
  23. #[Groups(['fullAccount', 'partialAccount', 'fullContact', 'partialContact'])]
  24. private $fax;
  25. /**
  26. * @var int
  27. */
  28. #[Groups(['fullAccount', 'partialAccount', 'fullContact', 'partialContact'])]
  29. private $id;
  30. /**
  31. * @var FaxType
  32. */
  33. #[Groups(['fullAccount', 'fullContact'])]
  34. private $faxType;
  35. /**
  36. * @var Collection<int, ContactInterface>
  37. */
  38. #[Exclude]
  39. private $contacts;
  40. /**
  41. * @var Collection<int, AccountInterface>
  42. */
  43. #[Exclude]
  44. private $accounts;
  45. /**
  46. * Constructor.
  47. */
  48. public function __construct()
  49. {
  50. $this->contacts = new ArrayCollection();
  51. $this->accounts = new ArrayCollection();
  52. }
  53. /**
  54. * Set fax.
  55. *
  56. * @param string $fax
  57. *
  58. * @return Fax
  59. */
  60. public function setFax($fax)
  61. {
  62. $this->fax = $fax;
  63. return $this;
  64. }
  65. /**
  66. * Get fax.
  67. *
  68. * @return string
  69. */
  70. public function getFax()
  71. {
  72. return $this->fax;
  73. }
  74. /**
  75. * Get id.
  76. *
  77. * @return int
  78. */
  79. public function getId()
  80. {
  81. return $this->id;
  82. }
  83. /**
  84. * Set faxType.
  85. *
  86. * @return Fax
  87. */
  88. public function setFaxType(FaxType $faxType)
  89. {
  90. $this->faxType = $faxType;
  91. return $this;
  92. }
  93. /**
  94. * Get faxType.
  95. *
  96. * @return FaxType
  97. */
  98. public function getFaxType()
  99. {
  100. return $this->faxType;
  101. }
  102. /**
  103. * Add contacts.
  104. *
  105. * @return Fax
  106. */
  107. public function addContact(ContactInterface $contacts)
  108. {
  109. $this->contacts[] = $contacts;
  110. return $this;
  111. }
  112. /**
  113. * Remove contacts.
  114. */
  115. public function removeContact(ContactInterface $contacts)
  116. {
  117. $this->contacts->removeElement($contacts);
  118. }
  119. /**
  120. * Get contacts.
  121. *
  122. * @return Collection<int, ContactInterface>
  123. */
  124. public function getContacts()
  125. {
  126. return $this->contacts;
  127. }
  128. /**
  129. * Add accounts.
  130. *
  131. * @return Fax
  132. */
  133. public function addAccount(AccountInterface $account)
  134. {
  135. $this->accounts[] = $account;
  136. return $this;
  137. }
  138. /**
  139. * Remove accounts.
  140. */
  141. public function removeAccount(AccountInterface $account)
  142. {
  143. $this->accounts->removeElement($account);
  144. }
  145. /**
  146. * Get accounts.
  147. *
  148. * @return Collection<int, AccountInterface>
  149. */
  150. public function getAccounts()
  151. {
  152. return $this->accounts;
  153. }
  154. }