| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace Meramo\Speedbase\Controller;
- use Meramo\Begriffmgt\Controller\DashboardController;
- use Meramo\Begriffmgt\Domain\Repository\CategoryRepository;
- use Meramo\Begriffmgt\Domain\Repository\TypeRepository;
- use Meramo\Begriffmgt\Controller\UrlController;
- use Meramo\Begriffmgt\Domain\Repository\UrlRepository;
- use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
- class SimpleController extends ActionController
- {
- public function __construct(
- DashboardController $dashboardController,
- CategoryRepository $categoryRepository,
- TypeRepository $typeRepository,
- UrlRepository $urlRepository,
- UrlController $urlController
- ){
- $this->dashboardController = $dashboardController;
- $this->categoryRepository = $categoryRepository;
- $this->typeRepository = $typeRepository;
- $this->urlRepository = $urlRepository;
- $this->urlController = $urlController;
- }
- public function persistDataToDBAction($termsList, $category, $type, $url){
- if(!($category === '') && !($category === null)){
- $category = ($this->categoryRepository->findByUid($category))->getTitle();
- } else {
- $category = '';
- }
- if(!($type === '') && !($type === null)){
- $type = ($this->typeRepository->findByUid($type))->getTitle();
- } else {
- $type = '';
- }
- if($url === null){
- $url = '';
- }
- $this->dashboardController->createAction($termsList, $category, $type, $url);
- }
- }
|