|
|
@@ -64,16 +64,12 @@ class DashboardController extends ActionController
|
|
|
$this->view->assign('terms', $terms);
|
|
|
}
|
|
|
|
|
|
- public function createAction(string $termList, $categoryTitle, $typeTitle, string $urlTitle): void {
|
|
|
+ public function createAction(string $termList, string $categoryTitle, string $typeTitle, string $urlTitle): void {
|
|
|
$terms = array_map('trim', explode(';', $termList));
|
|
|
- if($categoryTitle){
|
|
|
- $category = $this->categoryController->createAction($categoryTitle);
|
|
|
- $categoryObj = $this->categoryRepository->findByUid($category);
|
|
|
- }
|
|
|
- if($typeTitle){
|
|
|
- $type = $this->typeController->createAction($typeTitle);
|
|
|
- $typeObj = $this->typeRepository->findByUid($type);
|
|
|
- }
|
|
|
+ $category = $this->categoryController->createAction($categoryTitle);
|
|
|
+ $categoryObj = $this->categoryRepository->findByUid($category);
|
|
|
+ $type = $this->typeController->createAction($typeTitle);
|
|
|
+ $typeObj = $this->typeRepository->findByUid($type);
|
|
|
$url = $this->urlController->createAction($urlTitle);
|
|
|
$urlObj = $this->urlRepository->findByUid($url);
|
|
|
$this->termController->createAction($terms, $categoryObj, $typeObj, $urlObj);
|