Compare commits
No commits in common. "e5175e965f6ae4dd9e533acc3a23469dc6f5f05d" and "57d3efe1dff73b152cc0041792043961fb891ab6" have entirely different histories.
e5175e965f
...
57d3efe1df
2 changed files with 2 additions and 9 deletions
|
@ -6,7 +6,6 @@ namespace DigiComp\AttachmentViewUtility;
|
||||||
|
|
||||||
use Neos\Eel\CompilingEvaluator;
|
use Neos\Eel\CompilingEvaluator;
|
||||||
use Neos\Eel\Context;
|
use Neos\Eel\Context;
|
||||||
use Neos\Eel\EelEvaluatorInterface;
|
|
||||||
use Neos\Eel\Helper\ArrayHelper;
|
use Neos\Eel\Helper\ArrayHelper;
|
||||||
use Neos\Eel\Helper\StringHelper;
|
use Neos\Eel\Helper\StringHelper;
|
||||||
use Neos\Flow\Annotations as Flow;
|
use Neos\Flow\Annotations as Flow;
|
||||||
|
@ -48,13 +47,7 @@ trait EelFilenameTrait
|
||||||
throw new \RuntimeException('Your view options could not be found', 1697550440);
|
throw new \RuntimeException('Your view options could not be found', 1697550440);
|
||||||
}
|
}
|
||||||
$expression = $this->options[$this->eelExpressionOptionKey];
|
$expression = $this->options[$this->eelExpressionOptionKey];
|
||||||
|
$context = new Context(\array_merge($variables, [
|
||||||
return $this->getEelResult($expression, $variables);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getEelResult(string $expression, array $contextVariables)
|
|
||||||
{
|
|
||||||
$context = new Context(\array_merge($contextVariables, [
|
|
||||||
'Array' => new ArrayHelper(),
|
'Array' => new ArrayHelper(),
|
||||||
'String' => new StringHelper(),
|
'String' => new StringHelper(),
|
||||||
'Translation' => new TranslationHelper(),
|
'Translation' => new TranslationHelper(),
|
||||||
|
|
|
@ -54,5 +54,5 @@ Views.yaml:
|
||||||
requestFilter: "isController('Default') && isAction('download')"
|
requestFilter: "isController('Default') && isAction('download')"
|
||||||
viewObjectName: "Acme\\Vendor\\SimpleAttachmentView"
|
viewObjectName: "Acme\\Vendor\\SimpleAttachmentView"
|
||||||
options:
|
options:
|
||||||
filenameEelExpression: "'hello-' + name + '.txt'"
|
filenameEelExpression: "'hello-' + name + '.txt"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue