Commit 1f442fe9 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[BUGFIX] Re-enable category controller

parent 51bddbdb
Pipeline #10244 failed with stages
in 2 minutes and 1 second
<?php
namespace T3o\T3oPlanet\Controller;
use TYPO3\CMS\Extbase\Domain\Model\Category;
use TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
/***
*
* This file is part of the "Planet TYPO3" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019
*
***/
class CategoryController extends ActionController
{
protected ?\TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository $categoriesRepository;
public function injectCategoriesRepository(CategoryRepository $categoriesRepository): void
{
$this->categoriesRepository = $categoriesRepository;
}
/**
* action initialize
*/
public function initializeAction()
{
parent::initializeAction();
$data = $this->configurationManager->getContentObject();
$this->contentElementData = $data->data;
}
/**
* action list
*/
public function listAction()
{
$t3planetCategories = $this->categoriesRepository->findAll();
$this->view->assign('t3planetCategories', $t3planetCategories);
$this->view->assign('data', $this->contentElementData);
}
/**
* action show
*
* @param \TYPO3\CMS\Extbase\Domain\Model\Category $t3planetCategory
*/
public function showAction(Category $t3planetCategory)
{
$this->view->assign('t3planetCategories', $t3planetCategory);
}
}
......@@ -27,7 +27,7 @@
</numIndex>
<numIndex index="1">
<numIndex index="0">LLL:EXT:t3o_planet/Resources/Private/Language/locallang_db.xlf:tx_t3oplanet_domain_model_tag.topCategories</numIndex>
<numIndex index="1">T3planetCategories->list</numIndex>
<numIndex index="1">Category->list</numIndex>
</numIndex>
<numIndex index="2">
<numIndex index="0">LLL:EXT:t3o_planet/Resources/Private/Language/locallang_db.xlf:tx_t3oplanet_domain_model_tag.createPost</numIndex>
......
......@@ -9,13 +9,13 @@ call_user_func(
'Fet3oplanet',
[
'Article' => 'featuredList, filterArticle, articlesManagement, new, create, edit, update, delete',
'T3planetCategories' => 'list, show, new, create, edit, update, delete',
'Category' => 'list, show',
'T3planetTags' => 'list, show, new, create, edit, update, delete',
],
// non-cacheable actions
[
'Article' => 'featuredList, filterArticle, articlesManagement, new, create, edit, update, delete',
'T3planetCategories' => 'create, update, delete',
'Category' => '',
'T3planetTags' => 'create, update, delete',
]
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment