DigiComp.AssetAttributes/Classes/ViewHelpers/CustomAttributesViewHelper.php
Ferdinand Kuhl f35695268f
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful
First working version
2023-02-09 13:05:32 +01:00

21 lines
535 B
PHP

<?php
namespace DigiComp\AssetAttributes\ViewHelpers;
use Neos\Flow\Annotations as Flow;
use Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper;
use Neos\Utility\PositionalArraySorter;
class CustomAttributesViewHelper extends AbstractViewHelper
{
/**
* @Flow\InjectConfiguration(path="customAssetProperties")
* @var array|null
*/
protected ?array $customAssetProperties;
public function render(): array
{
return (new PositionalArraySorter($this->customAssetProperties))->toArray();
}
}