Skip to content
Snippets Groups Projects
Commit 233f3c70 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Remove blacklisted templates from filter choices

parent fa8a3aaa
No related branches found
No related tags found
1 merge request!6Feature 4 3
......@@ -112,7 +112,7 @@ class QueueController extends ActionController {
$this->view->assign('selectedExtensionKey', $selectedExtension);
$this->view->assign('templates', $registerArray);
$this->view->assign('templatesFilter', BackendService::getTemplatesForFilter());
$this->view->assign('templatesFilter', BackendService::getTemplatesForFilter($pageUid));
$this->view->assign('languages', BackendService::getLanguagesForFilter());
$this->view->assign('mode', 'queue');
......
......@@ -252,10 +252,15 @@ class BackendService {
/**
* Get the template keys in an array suitable for filtering
*
* @param int $pageUid
* @return array
* @throws \InvalidArgumentException
* @throws \BadFunctionCallException
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
*/
public static function getTemplatesForFilter() {
$registerArray = MailTemplateService::getRegisterArray();
public static function getTemplatesForFilter($pageUid): array {
$pageUid = (int) $pageUid;
$registerArray = self::getWhitelistedTemplates($pageUid);
$templates = [];
foreach ($registerArray as $extensions) {
foreach ($extensions as $template => $key) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment