partkeepr

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

commit 33f73a30fd706ecf9c069148a0a47e50f7d77f6d
parent 76a08d2d4b86ae16649ee8267f95426854f957ac
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed,  7 Oct 2015 17:23:24 +0200

Added category services for footprints, storage locations and parts

Diffstat:
Msrc/PartKeepr/FootprintBundle/Resources/config/services.xml | 9+++------
Msrc/PartKeepr/PartBundle/Resources/config/services.xml | 5+++++
Asrc/PartKeepr/StorageLocationBundle/DependencyInjection/PartKeeprStorageLocationExtension.php | 25+++++++++++++++++++++++++
Asrc/PartKeepr/StorageLocationBundle/Resources/config/services.xml | 13+++++++++++++
4 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/src/PartKeepr/FootprintBundle/Resources/config/services.xml b/src/PartKeepr/FootprintBundle/Resources/config/services.xml @@ -4,13 +4,10 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - <!-- <services> - <service id="part_keepr_footprint.example" class="PartKeepr\FootprintBundle\Example"> - <argument type="service" id="service_id" /> - <argument>plain_value</argument> - <argument>%parameter_name%</argument> + <service id="partkeepr.footprint.category_service" class="PartKeepr\CategoryBundle\Services\CategoryService"> + <argument type="service" id="doctrine.orm.default_entity_manager" /> + <argument>PartKeepr\FootprintBundle\Entity\FootprintCategory</argument> </service> </services> - --> </container> diff --git a/src/PartKeepr/PartBundle/Resources/config/services.xml b/src/PartKeepr/PartBundle/Resources/config/services.xml @@ -8,5 +8,10 @@ <service id="partkeepr.part_measurement_unit_service" class="PartKeepr\PartBundle\Services\PartMeasurementUnitService"> <argument type="service" id="doctrine.orm.default_entity_manager"/> </service> + <service id="partkeepr.part.category_service" class="PartKeepr\CategoryBundle\Services\CategoryService"> + <argument type="service" id="doctrine.orm.default_entity_manager" /> + <argument>PartKeepr\PartBundle\Entity\PartCategory</argument> + </service> </services> + </container> diff --git a/src/PartKeepr/StorageLocationBundle/DependencyInjection/PartKeeprStorageLocationExtension.php b/src/PartKeepr/StorageLocationBundle/DependencyInjection/PartKeeprStorageLocationExtension.php @@ -0,0 +1,25 @@ +<?php + +namespace PartKeepr\StorageLocationBundle\DependencyInjection; + +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Loader; + +/** + * This is the class that loads and manages your bundle configuration + * + * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} + */ +class PartKeeprStorageLocationExtension extends Extension +{ + /** + * {@inheritdoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.xml'); + } +} diff --git a/src/PartKeepr/StorageLocationBundle/Resources/config/services.xml b/src/PartKeepr/StorageLocationBundle/Resources/config/services.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" ?> + +<container xmlns="http://symfony.com/schema/dic/services" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> + + <services> + <service id="partkeepr.storage_location.category_service" class="PartKeepr\CategoryBundle\Services\CategoryService"> + <argument type="service" id="doctrine.orm.default_entity_manager" /> + <argument>PartKeepr\StorageLocationBundle\Entity\StorageLocationCategory</argument> + </service> + </services> +</container>