Skip to the content
Documentation

tutorialtutorial

Create the extension Bundle To extend PlatformUI, the very first thing to do is to create a Symfony bundle. For that, you can use the Symfony generate bundle command in the following way: Filter by Content Type This step is very similar to the previous one on adding pagination. We are going to add a new type parameter in the whole component stack; the main difference with the offset case is that the user will pick a Content Type in a drop-down list instead of just using the Next/Previous links in the page. Set up the configuration Each component of the PlatformUI application is written as a YUI module. The YUI module system comes with a dependency system which is used in the PlatformUI application. For instance, the PlatformUI application has a module called ez-templatebasedview which provides a base view class to ease the us Implement the Tweet\Type class (page id 31429772) As said in the introduction, the Type class of a Field Type must implement eZ\Publish\SPI\FieldType\FieldType (later referred to as "Field Type interface"). Structure the bundle (page id 31429784) At this point, we have an “anonymous” Symfony 2 bundle. Implement the Legacy Storage Engine Converter (page id 31... 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. Implement the Tweet\Value class (page id 31429770) 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 . Create the bundle (page id 31429782) 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. Register the Field Type as a service (page id 31429774) To complete the implementation, we must register our Field Type with Symfony by creating a service for it. Create 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.