Extbase repositories
New in version 0.7.3
Feature: #23 - Provide compatibility method for Extbase repositories
Warning
Use of the Abstract required
This compatibility method is only applicable to Data
that extend the Abstract, since it provides the
necessary method. It is not part of the Data interface.
When Extbase repositories are used to fetch data via the Data,
it may be necessary to perform the necessary bootstrapping for Extbase
repositories. This is the case whenever the rendering process is executed
outside the Extbase context and fields such as tt_ or
tt_ are to be accessed in the repository to determine
the storage PIDs.
To execute the necessary bootstrapping or to reset the underlying
Configuration and to fill it with the current
Content, the method
initialize must be executed in the
Data.
Usage
# Classes/DataProcessing/HeaderProcessor.php
namespace Vendor\Extension\DataProcessing;
use CPSIT\Typo3Handlebars\DataProcessing\AbstractDataProcessor;
class HeaderProcessor extends AbstractDataProcessor
{
protected function render(): string
{
+ $this->initializeConfigurationManager();
$data = $this->provider->get($this->cObj->data);
return $this->presenter->present($data);
}
}