![]() Here are some ready to use data processors from the core and a very useful example from the bootstrap package. Need some ideas, what to do in a dataprocessor? Ready to use processors and examples This is only necessary, if your data processor should also be used in composer based installations. If you already have a composer.json file, you probably do not need to add the following lines: 'MyVendorName\\MyExtension\\' => 'Classes' You need to make sure to return the processed data at the end.Ī minimalistic implementation might look like this: The interface only contains one function process. The class must implement the interface DataProcessorInterface. In the second step you must create a class in the directory Classes/DataProcessing of your extension. 2) Create a class implementing an interface All other values of the array will be passed to the class as the processor configuration. The key as in section 10 defines the key under that the data will be available in the template. The following example makes is more clear: The value of an element is the class name of the data processor class. This section takes a numeric TypoScript array. In a TypoScript definition of a FLUIDTEMPLATE, you must register the data processor in the section dataProcessing. There are three steps, you need to take, in order to use a custom data processor in your fluid template 1) Register the data processor in the fluid template Data processors provide additional values to the fluid template. This is where data processors will help you. OK, you probably know that, but I wanted to make that sure.īut there might be some more data, you want to use in in the template. In order to get an overview over all available values in a fluid template, you can insert a statement anywhere in the template and they will be shown at the beginning of the page. Ready to use data processors and real life examples are the topic at the end. In the first part of this this post I will show how to create and use a data processor. The “missing” data can be provided through data processors. There are cases, in which these values are not sufficient and other data is needed. In Fluid templates only values, assigned by the extbase controller, are available. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |