|
@@ -15,12 +15,14 @@ class TermController extends ActionController
|
|
|
|
|
|
|
|
public function createAction($terms, $categoryObj, $typeObj, $urlObj): void {
|
|
public function createAction($terms, $categoryObj, $typeObj, $urlObj): void {
|
|
|
foreach ($terms as $term) {
|
|
foreach ($terms as $term) {
|
|
|
- $termObj = new Term();
|
|
|
|
|
- $termObj->setTerm($term);
|
|
|
|
|
- $termObj->setCategory($categoryObj);
|
|
|
|
|
- $termObj->setType($typeObj);
|
|
|
|
|
- $termObj->setUrl($urlObj);
|
|
|
|
|
- $this->termRepository->add($termObj);
|
|
|
|
|
|
|
+ if($term !== '') {
|
|
|
|
|
+ $termObj = new Term();
|
|
|
|
|
+ $termObj->setTerm($term);
|
|
|
|
|
+ $termObj->setCategory($categoryObj);
|
|
|
|
|
+ $termObj->setType($typeObj);
|
|
|
|
|
+ $termObj->setUrl($urlObj);
|
|
|
|
|
+ $this->termRepository->add($termObj);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|