ClosureCategory.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace Mapping\Fixture\Yaml;
  3. class ClosureCategory
  4. {
  5. private $id;
  6. private $title;
  7. private $children;
  8. private $parent;
  9. private $level;
  10. /**
  11. * Get id
  12. *
  13. * @return integer $id
  14. */
  15. public function getId()
  16. {
  17. return $this->id;
  18. }
  19. /**
  20. * Set title
  21. *
  22. * @param string $title
  23. */
  24. public function setTitle($title)
  25. {
  26. $this->title = $title;
  27. }
  28. /**
  29. * Get title
  30. *
  31. * @return string $title
  32. */
  33. public function getTitle()
  34. {
  35. return $this->title;
  36. }
  37. /**
  38. * Add children
  39. *
  40. * @param Entity\Category $children
  41. */
  42. public function addChildren(Category $children)
  43. {
  44. $this->children[] = $children;
  45. }
  46. /**
  47. * Get children
  48. *
  49. * @return Doctrine\Common\Collections\Collection $children
  50. */
  51. public function getChildren()
  52. {
  53. return $this->children;
  54. }
  55. /**
  56. * Set parent
  57. *
  58. * @param Entity\Category $parent
  59. */
  60. public function setParent($parent)
  61. {
  62. $this->parent = $parent;
  63. }
  64. /**
  65. * Get parent
  66. *
  67. * @return Entity\Category $parent
  68. */
  69. public function getParent()
  70. {
  71. return $this->parent;
  72. }
  73. public function setLevel($level)
  74. {
  75. $this->level = $level;
  76. }
  77. public function getLevel()
  78. {
  79. return $this->level;
  80. }
  81. }