Drupal Symfony Inject
Categories
Component ID
2201597
Component name
Drupal Symfony Inject
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
1469
Component created
Component changed
Component body
Introduction
"Drupal Symfony Inject" allow you to use the Symfony dependency injection component inside your Drupal 7 projects. The module offers you with hooks to have your own Yaml configurations, fully PSR-0 compatible namespaces and settings inside your custom modules. The Symfony container is fully compiled and cached in Drupal.
PHP Version: 5.3.x or greater.
Dependencies: Composer Manager
API Hooks
- hook_namespace_register : Register custom namespaces you need in your module. The implementation expects a key value paired array. The key should be the namespace and the value should be the path to the namespace.
- hook_symfony_yaml_config : Define custom paths to your Symfony DI Yaml config files. Implementation should return an array with key value pair, The key should be the Yaml file name and the value should be the path to the Yaml file.
ex: array('config.yaml' => '/config/yaml');
In the above example, the config file is config.yaml and the path to it is '/config/yaml'. - hook_symfony_yaml_config_params : Any custom parameters you need to set in the Yaml config. Again this should return an array where keys should be the parameters and the values as the values for the parameter.
Drupal Alter
symfony_container_builder_alter : To add any final config changes to Symfony DI container before it gets compiled and saved in Drupal cache.
Raise issues on Github
Development for this module takes place over on Github. Please raise issues over there.
