This topic contains 0 replies, has 1 voice, and was last updated by Nick Mallare 9 years, 5 months ago.
- Topic
Hi,
I was looking at the documentation and came across this — http://oroinc.com/orocrm/doc/current/book/customization#replace-services
Is there any way to use the DependencyInjection directory to load files from Bundle/Resources/config directory?
I can get OroCRM to read the Extension.php file, but when I add these lines, they don’t seem to load.
Acme\Bundle\TestBundle\DependencyInjection\AcmeTestExtension.php
12345678910111213141516class AcmeTestExtension extends Extension{/*** {@inheritDoc}*/public function load(array $configs, ContainerBuilder $container){$configuration = new Configuration();$config = $this->processConfiguration($configuration, $configs);$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));$loader->load('form.yml');}}Acme\Bundle\TestBundle\Resource\Config\form.yml
12345678910parameters:orocrm_campaign.campaign.form.type.class: Acme\Bundle\TestBundle\Form\Type\CampaignTypeservices:orocrm_campaign.campaign.form.type:class: Acme\Bundle\TestBundle\Form\Type\CampaignTypetags:- { name: form.type, alias: acme_test_campaign}Acme\Bundle\TestBundle\DependencyInjection\Configuration.php
123456789101112131415class Configuration implements ConfigurationInterface{/*** {@inheritDoc}*/public function getConfigTreeBuilder(){$treeBuilder = new TreeBuilder();$rootNode = $treeBuilder->root('acme_test');return $treeBuilder;}}Thanks,
Nick
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.