34 lines
823 B
PHP
34 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';
|
||
|
}
|
||
|
}
|