digitalstate / platform-organization-bundle
DigitalState Organization Bundle
Installs: 142
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Type:symfony-bundle
Requires
- php: >=5.6
- oro/platform: 2.0.*
- oro/platform-serialised-fields: 2.0.*
This package is not auto-updated.
Last update: 2024-10-26 20:32:27 UTC
README
The Organization bundle extends the OroOrganizationBundle and provides the developers additional core organization functionality.
Table of Contents
Migration Extensions
This bundle introduces a collection of convenient migration extensions to help with loading yml-based data fixtures.
Example:
<?php namespace Gov\Bundle\DemoBundle\Migrations\Data\ORM; use Doctrine\Common\DataFixtures\AbstractFixture; use Ds\Bundle\OrganizationBundle\Migration\Extension\BusinessUnitExtensionAwareInterface; use Ds\Bundle\OrganizationBundle\Migration\Extension\BusinessUnitExtensionAwareTrait; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Doctrine\Common\Persistence\ObjectManager; class LoadBusinessUnitData extends AbstractFixture implements BusinessUnitExtensionAwareInterface, ContainerAwareInterface { use BusinessUnitExtensionAwareTrait; use ContainerAwareTrait; public function load(ObjectManager $manager) { // Currently extensions are not automatically injected via the *AwareInterface. $this->setBusinessUnitExtension($this->container->get('ds.organization.migration.extension.business_unit')); // $resource = __DIR__.'/../../../Resources/data/business_unit.yml'; $this->businessUnitExtension->import($resource, $manager); } }
business_units: - name: Public Works - name: Finance - name: Human Resources prototype: name: ~ phone: ~ website: ~ email: ~ fax: ~ organization: default parent: ~