DigiComp.AttachmentViewUtility/Tests/Functional/Fixtures/SimpleAttachmentTemplateView.php
Ferdinand Kuhl 57d3efe1df
All checks were successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful
Initial version
2023-10-17 22:52:28 +02:00

33 lines
823 B
PHP

<?php
declare(strict_types=1);
namespace DigiComp\AttachmentViewUtility\Tests\Functional\Fixtures;
use DigiComp\AttachmentViewUtility\AttachmentViewTrait;
use DigiComp\AttachmentViewUtility\EelFilenameTrait;
use Neos\Flow\Mvc\View\SimpleTemplateView;
class SimpleAttachmentTemplateView extends SimpleTemplateView
{
use AttachmentViewTrait;
use EelFilenameTrait;
public function __construct(array $options = [])
{
$this->addOptionFilenameEelExpression();
$this->addOptionsForAttachment();
parent::__construct($options);
}
protected function getAttachmentContent()
{
/** @noinspection MissUsingParentKeywordInspection */
return parent::render();
}
protected function getAttachmentMimeType(): string
{
return 'text/plain';
}
}