Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titleUsing a dedicated file for the FieldType services

In order to be closer with the kernel best practices, we could declare our FieldType services in a custom fieldtypes.yml file.

 All we have to do is instruct the bundle to actually load this file in addition to services.yml (or instead of services.yml !). This is done in the extension definition file, DependencyInjection/EzSystemsTweetFieldTypeExtension.php, in the load() method.

Inside this file, file, find this line:

 

Code Block
languagephp
$loader->load('services.yml');

 

This is where our bundle tells Symfony that when parameters are loaded, services.yml should be loaded from Resources/config/ (defined above). Either replace edit the line, or add a new one with:

Code Block
languagephp
$loader->load('fieldtypes.yml');

...