| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- declare(strict_types=1);
- namespace Meramo\Begriffmgt\Controller;
- use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
- use Meramo\Begriffmgt\Domain\Repository\TermRepository;
- use TYPO3\CMS\Extbase\Persistence\QueryInterface;
- use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
- use Meramo\Begriffmgt\Domain\Model\Term;
- /**
- * Determines what happens when the Module Buttom/Link is clicked
- */
- class DashboardController extends ActionController
- {
- /**
- * @var TermRepository $termRepository
- */
- protected $termRepository;
- /**
- * Set Sort order of Data in List Module
- */
- protected $defaultOrderings = ['uid' => QueryInterface::ORDER_ASCENDING];
- /**
- * @param TermRepository $termRepository
- */
- public function injectTermRepository(TermRepository $termRepository): void
- {
- $this->termRepository = $termRepository;
- }
- public function indexAction()
- {
- $terms = $this->termRepository->findAll();
- // DebuggerUtility::var_dump($terms);
- $query = $terms->getQuery();
- // DebuggerUtility::var_dump($query);
- $query->setOrderings(['uid' => QueryInterface::ORDER_ASCENDING]);
- $this->view->assign('terms', $query->execute());
- }
- }
|