DigiComp.AttachmentViewUtility/Tests/Functional/Fixtures/SimpleAttachmentTemplateView.php

34 lines
823 B
PHP
Raw Normal View History

2023-10-17 18:49:19 +02:00
<?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';
}
}