partkeepr

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

commit ba19b48bd10a40172339b5c2d75be8dbc741b67d
parent b0bc9a1be05473f0451c6c09c8e06e25403c3f88
Author: Timo A. Hummel <felicitus@felicitus.org>
Date:   Sat, 21 Apr 2018 20:51:57 +0200

Added group for tree serialization so that tree children aren't serialized when used in-line, for example, in the project reports

Diffstat:
Mapp/config/config_partkeepr.yml | 4++--
Msrc/PartKeepr/FootprintBundle/Entity/FootprintCategory.php | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/config/config_partkeepr.yml b/app/config/config_partkeepr.yml @@ -318,10 +318,10 @@ services: - method: "initItemOperations" arguments: [ [ "@resource.footprint_category.item_operation.get", "@resource.footprint_category.item_operation.put", "@resource.footprint_category.item_operation.delete", "@resource.footprint_category.item_operation.move" ] ] - method: "initNormalizationContext" - arguments: [ { groups: [ "default" ] } ] + arguments: [ { groups: [ "default", "tree" ] } ] - method: "initDenormalizationContext" arguments: - - { groups: [ "default" ] } + - { groups: [ "default", "tree" ] } resource.import_preset: parent: "api.resource" diff --git a/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php b/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php @@ -29,7 +29,7 @@ class FootprintCategory extends AbstractCategory implements CategoryPathInterfac /** * @ORM\OneToMany(targetEntity="FootprintCategory", mappedBy="parent") * @ORM\OrderBy({"lft" = "ASC"}) - * @Groups({"default"}) + * @Groups({"tree"}) */ protected $children;