forked from Gernott/mask
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] switch mask content elements rendering to FLUIDTEMPLATE
- Loading branch information
Showing
4 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace MASK\Mask\DataProcessing; | ||
|
||
use MASK\Mask\Helper\InlineHelper; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Extbase\Object\ObjectManager; | ||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; | ||
|
||
class MaskProcessor extends \TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | ||
{ | ||
|
||
/** | ||
* InlineHelper | ||
* | ||
* @var \MASK\Mask\Helper\InlineHelper | ||
* @Inject() | ||
*/ | ||
protected $inlineHelper; | ||
|
||
/** | ||
* Process data of a record to add files and inline elements of mask fields | ||
* | ||
* @param ContentObjectRenderer $cObj The data of the content element or page | ||
* @param array $contentObjectConfiguration The configuration of Content Object | ||
* @param array $processorConfiguration The configuration of this processor | ||
* @param array $processedData Key/value store of processed data (e.g. to be passed to a Fluid View) | ||
* @return array the processed data as key/value store | ||
*/ | ||
public function process( | ||
ContentObjectRenderer $cObj, | ||
array $contentObjectConfiguration, | ||
array $processorConfiguration, | ||
array $processedData | ||
) { | ||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class); | ||
$this->inlineHelper = $objectManager->get(InlineHelper::class); | ||
|
||
$this->inlineHelper->addFilesToData($processedData['data'], "tt_content"); | ||
$this->inlineHelper->addIrreToData($processedData['data']); | ||
return $processedData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.