Skip to the content
Documentation

tutorialtutorial

The bundle (page id 30711521) FieldTypes, like any other eZ Platform extensions, must be provided as Symfony 2 bundles. This chapter will cover the creation and organization of this bundle. Implementing the Tweet\Value class (page id 30711525) The Value class of a Field Type is by design very simple. It is meant to be stateless, and as lightweight as possible. Therefore, this class must contain as little logic as possible, as this is the responsibility of the Type class . Creating the bundle (page id 30711522) Custom Field Types follow the Symfony 2 extension mechanism: bundles . We can get started with a bundle using the built-in Symfony 2 bundle generator. Registering the Field Type as a service (page id 30711528) To complete the implementation, we must register our Field Type with Symfony by creating a service for it. Implementing the Legacy Storage Engine Converter (page id... So far, our Field Type’s value is represented by the Tweet\Value class. It holds a semantic representation of the type’s data: a url, author url and the tweet's content. Template implementation (page id 30711530) In order to display data of our Field Type from templates, we need to create and register a template for it. You can find documentation about FieldType templates, as well as on importing settings from a bundle. Structuring the bundle (page id 30711524) At this point, we have an “anonymous” Symfony 2 bundle. Creating the bundle Custom Field Types follow the Symfony 2 extension mechanism: bundles . We can get started with a bundle using the built-in Symfony 2 bundle generator. The bundle FieldTypes, like any other eZ Platform extensions, must be provided as Symfony 2 bundles. This chapter will cover the creation and organization of this bundle. Implementing the Legacy Storage Engine Converter So far, our Field Type’s value is represented by the Tweet\Value class. It holds a semantic representation of the type’s data: a url, author url and the tweet's content.