commit 11b7a4bfded91db5fb43338c64e1651908fbb093
parent aeebf552009032f532a5eb22dc25d9933ff03fa9
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 15 Jul 2015 01:00:07 +0200
Re-added footprints to the FootprintCategory
Diffstat:
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php b/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php
@@ -1,6 +1,7 @@
<?php
namespace PartKeepr\FootprintBundle\Entity;
+use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use PartKeepr\CategoryBundle\Entity\AbstractCategory;
@@ -29,16 +30,17 @@ class FootprintCategory extends AbstractCategory
* @ORM\OrderBy({"lft" = "ASC"})
* @Groups({"default"})
*/
- public $children;
+ protected $children;
/**
- * ORM\OneToMany(targetEntity="Footprint", mappedBy="category")
- * Groups({"default"})
+ * @ORM\OneToMany(targetEntity="Footprint", mappedBy="category")
+ * @Groups({"default"})
*/
- public $footprints;
+ protected $footprints;
/**
* Sets the parent category
+ *
* @param AbstractCategory|null $parent
*/
public function setParent(AbstractCategory $parent = null)
@@ -48,10 +50,31 @@ class FootprintCategory extends AbstractCategory
/**
* Returns the parent category
+ *
* @return mixed
*/
public function getParent()
{
return $this->parent;
}
+
+ /**
+ * Returns the footprints
+ *
+ * @return ArrayCollection
+ */
+ public function getFootprints()
+ {
+ return $this->footprints;
+ }
+
+ /**
+ * Returns the children
+ *
+ * @return ArrayCollection
+ */
+ public function getChildren()
+ {
+ return $this->children;
+ }
}