partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0c73fb3e3f9f7dfb11714cc5444253ca1739e662
parent c06ef811d7e81e5ba4d750ee35ebfca31f9b2223
Author: Felicitus <felicitus@felicitus.org>
Date:   Thu, 23 Jul 2015 21:44:01 +0200

Added method to return the category path

Diffstat:
Msrc/PartKeepr/FootprintBundle/Entity/Footprint.php | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/PartKeepr/FootprintBundle/Entity/Footprint.php b/src/PartKeepr/FootprintBundle/Entity/Footprint.php @@ -70,6 +70,21 @@ class Footprint extends BaseEntity private $attachments; /** + * Returns the category path + * @Groups({"default"}) + * + * @return string + */ + public function getCategoryPath() + { + if ($this->category !== null) { + return $this->category->getCategoryPath(); + } else { + return ""; + } + } + + /** * Constructs a new Footprint entity */ public function __construct()