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.
Project information
- Module categories: Developer Tools
- Created by sankatha on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Fixes 7.x-1.8
Development version: 7.x-1.x-dev updated 10 Mar 2016 at 12:03 UTC