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.

...

Like most API components, FieldTypes use the Symfony 2 service tag mechanism.

 The principle is quite simple: a service can be assigned one or several tags, with specific parameters. When the dependency injection container is compiled into a PHP file, tags are read by CompilerPass implementations that add extra handling for tagged services.   For FieldTypes, each Each service tagged as ezpublish.fieldType is added to a registry using the alias argument as its unique identifier (ezstring, ezxmltext…). Each FieldType must also inherit from the abstract ezpublish.fieldType service. This ensures that the initialization steps shared by all fieldtypes are executed.

...