Advertisement
Guest User

Untitled

a guest
Sep 30th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. <?php
  2. namespace Backend\Modules\Asaf\Domain\Categorys;
  3.  
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Backend\Core\Engine\Authentication;
  6. use Common\Doctrine\Entity\Meta;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. // * Class Product
  10. // * @package Backend\Modules\AsafDomain\Category
  11.  
  12. /**
  13. *
  14. * @ORM\Table(name="asaf_category")
  15. * @ORM\Entity(repositoryClass="Backend\Modules\Asaf\Domain\Categorys\CategoryRepository")
  16. */
  17.  
  18. class Category
  19. {
  20. /**
  21. * @var integer
  22. *
  23. * @ORM\Column(type="integer")
  24. * @ORM\Id()
  25. * @ORM\GeneratedValue()
  26. */
  27. private $id = 0;
  28.  
  29. /**
  30. * @var string
  31. *
  32. * @ORM\Column(type="string", name="title")
  33. */
  34. private $title;
  35.  
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(type="string", name="path", nullable=true)
  40. */
  41. private $path;
  42.  
  43.  
  44. /**
  45. * @var integer
  46. *
  47. * @ORM\Column(type="integer", name="parent", nullable=true)
  48. */
  49. private $parent;
  50.  
  51. /**
  52. * @var string
  53. *
  54. * @ORM\Column(type="text", nullable=true)
  55. */
  56. private $description = '';
  57.  
  58.  
  59. /**
  60. * @var boolean
  61. *
  62. * @ORM\Column(type="boolean", options={"default" = false})
  63. */
  64. private $active = false;
  65.  
  66.  
  67. /**
  68. * @var string
  69. *
  70. * @ORM\Column(type="string", length=255)
  71. */
  72. private $image = '';
  73.  
  74.  
  75. /**
  76. * @var string
  77. *
  78. * @ORM\Column(type="string", name="main_category")
  79. */
  80. private $maincategory;
  81.  
  82.  
  83. /**
  84. * @return int
  85. */
  86. public function getId(): int
  87. {
  88. return $this->id;
  89. }
  90.  
  91. public function setId($id): int
  92. {
  93. return $this->id = $id;
  94. }
  95.  
  96. /**
  97. * @return bool
  98. */
  99. public function isActive(): bool
  100. {
  101. return $this->active;
  102. }
  103.  
  104. /**
  105. * @param bool $active
  106. */
  107. public function setActive(bool $active): void
  108. {
  109. $this->active = $active;
  110. }
  111.  
  112. /**
  113. * @return string
  114. */
  115. public function getTitle()
  116. {
  117. return (string)$this->title;
  118. }
  119.  
  120. /**
  121. * @param string $title
  122. */
  123. public function setTitle(string $title): void
  124. {
  125. $this->title = $title;
  126. }
  127.  
  128. /**
  129. * @return string
  130. */
  131. public function getDescription()
  132. {
  133. return (string)$this->description;
  134. }
  135.  
  136. /**
  137. * @param string $description
  138. */
  139. public function setDescription(string $description): void
  140. {
  141. $this->description = $description;
  142. }
  143.  
  144.  
  145. /**
  146. * @return string
  147. */
  148. public function getImage(): string
  149. {
  150. return $this->image;
  151. }
  152.  
  153. /**
  154. * @param string $image
  155. */
  156. //public function setImage(string $image): void
  157. public function setImage($image): void
  158. {
  159. if(!$image){
  160. $image = '';
  161. }
  162. $this->image = $image;
  163. }
  164.  
  165.  
  166. /**
  167. * @return string
  168. */
  169. public function getMainCategory()
  170. {
  171. return (string)$this->maincategory;
  172. }
  173.  
  174. /**
  175. * @param string $maincategory
  176. */
  177. public function setMainCategory(string $maincategory): void
  178. {
  179. $this->maincategory = $maincategory;
  180. }
  181. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement