adjusting to new storage location of render functions
Some checks failed
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests/1 Pipeline failed
ci/woodpecker/push/functional-tests/3 Pipeline failed
ci/woodpecker/push/functional-tests/2 Pipeline failed
ci/woodpecker/push/functional-tests/4 Pipeline failed
Some checks failed
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests/1 Pipeline failed
ci/woodpecker/push/functional-tests/3 Pipeline failed
ci/woodpecker/push/functional-tests/2 Pipeline failed
ci/woodpecker/push/functional-tests/4 Pipeline failed
This commit is contained in:
parent
7585baee36
commit
850e9b90dd
3 changed files with 17 additions and 1 deletions
|
@ -11,6 +11,7 @@ use Doctrine\ORM\Query\Parameter;
|
|||
use Neos\Flow\Annotations as Flow;
|
||||
use Neos\Flow\Persistence\Doctrine\Query;
|
||||
use Neos\FluidAdaptor\Core\Widget\AbstractWidgetController;
|
||||
use Neos\FluidAdaptor\View\TemplateView;
|
||||
use Neos\Utility\TypeHandling;
|
||||
|
||||
class FluidJsonController extends AbstractWidgetController
|
||||
|
@ -80,6 +81,12 @@ class FluidJsonController extends AbstractWidgetController
|
|||
public function indexAction()
|
||||
{
|
||||
$this->view->assign('entityClassName', $this->query->getType());
|
||||
if ($this->view instanceof TemplateView) {
|
||||
$renderingContext = $this->request
|
||||
->getInternalArgument('__widgetContext')
|
||||
->getViewHelperChildNodeRenderingContext();
|
||||
$this->view->assignMultiple($renderingContext->getVariableProvider()->getAll());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace DigiComp\FluidJsonViews\ViewHelpers;
|
|||
|
||||
use DigiComp\FluidJsonViews\ViewHelpers\Controller\FluidJsonController;
|
||||
use DigiComp\FluidRenderFunctions\InvokeRenderFunctionInterface;
|
||||
use DigiComp\FluidRenderFunctions\ViewHelpers\Traits\ValidateRenderFunctionTrait;
|
||||
use Neos\Flow\Annotations as Flow;
|
||||
use Neos\Flow\Mvc\Exception\InfiniteLoopException;
|
||||
use Neos\Flow\Mvc\Exception\StopActionException;
|
||||
|
@ -16,6 +17,8 @@ use Neos\FluidAdaptor\Core\Widget\Exception\MissingControllerException;
|
|||
|
||||
class FluidJsonViewHelper extends AbstractWidgetViewHelper
|
||||
{
|
||||
use ValidateRenderFunctionTrait;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @Flow\Inject
|
||||
|
@ -51,6 +54,12 @@ class FluidJsonViewHelper extends AbstractWidgetViewHelper
|
|||
);
|
||||
}
|
||||
|
||||
public function validateArguments()
|
||||
{
|
||||
parent::validateArguments();
|
||||
$this->validateRenderFunctionArgument('renderFunction');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InfiniteLoopException
|
||||
* @throws InvalidControllerException
|
||||
|
|
|
@ -7,7 +7,7 @@ Let me provide you an example:
|
|||
<rf:registerRenderFunction as="renderTag">
|
||||
{subject.name}
|
||||
</rf:registerRenderFunction>
|
||||
<fj:fluidJson objects="{tags}" renderFunction="{renderTag}" searchProperties="{0: 'name'}">
|
||||
<fj:fluidJson objects="{tags}" renderFunction="renderTag" searchProperties="{0: 'name'}">
|
||||
<a href="{dataUri}">jsonView</a>
|
||||
</fj:fluidJson>
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue