From 8e256d8761964bd7b32966e86935ddc3821b59fd Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 20 Nov 2019 22:28:04 +0100 Subject: [PATCH] cleanup and tests added for ci/cd --- Controller/BackendController.php | 11 ++++++++++- .../DepartmentTagSelectorPopupView.php | 16 ++++++++++++++++ .../DepartmentTagSelectorView.php | 14 ++++++++++++++ .../PositionTagSelectorPopupView.php | 16 ++++++++++++++++ .../PositionTagSelectorView.php | 14 ++++++++++++++ .../UnitTagSelector/UnitTagSelectorPopupView.php | 16 ++++++++++++++++ .../UnitTagSelector/UnitTagSelectorView.php | 14 ++++++++++++++ 7 files changed, 100 insertions(+), 1 deletion(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6a632b8..9285764 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -122,7 +122,16 @@ final class BackendController extends Controller return $view; } - private function createOrgTree($components) : array + /** + * Create organization tree + * + * @param array $components Componants to form tree for + * + * @return array + * + * @since 1.0.0 + */ + private function createOrgTree(array $components) : array { $tree = []; foreach ($components as $component) { diff --git a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorPopupView.php b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorPopupView.php index d0a787e..ca4550b 100644 --- a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorPopupView.php +++ b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorPopupView.php @@ -41,11 +41,27 @@ class DepartmentTagSelectorPopupView extends View $this->setTemplate('/Modules/Organization/Theme/Backend/Components/DepartmentTagSelector/department-selector-popup'); } + /** + * Set the selector id + * + * @param string $id Selector id + * + * @return void + * + * @since 1.0.0 + */ public function setId(string $id) : void { $this->id = $id; } + /** + * Get selector id + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; diff --git a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php index da3d855..719949c 100644 --- a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php +++ b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php @@ -45,11 +45,25 @@ class DepartmentTagSelectorView extends View $this->addData('department-selector-popup', $view); } + /** + * Get the selector id + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; } + /** + * Is required? + * + * @return bool + * + * @since 1.0.0 + */ public function isRequired() : bool { return $this->isRequired; diff --git a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorPopupView.php b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorPopupView.php index 7a804e6..45512d4 100644 --- a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorPopupView.php +++ b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorPopupView.php @@ -41,11 +41,27 @@ class PositionTagSelectorPopupView extends View $this->setTemplate('/Modules/Organization/Theme/Backend/Components/PositionTagSelector/position-selector-popup'); } + /** + * Set selctor id. + * + * @param string $id Id + * + * @return void + * + * @since 1.0.0 + */ public function setId(string $id) : void { $this->id = $id; } + /** + * Get selector id. + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; diff --git a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php index 32e5ab4..c695632 100644 --- a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php +++ b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php @@ -45,11 +45,25 @@ class PositionTagSelectorView extends View $this->addData('position-selector-popup', $view); } + /** + * Get selector id + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; } + /** + * Is required? + * + * @return bool + * + * @since 1.0.0 + */ public function isRequired() : bool { return $this->isRequired; diff --git a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorPopupView.php b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorPopupView.php index 6521d18..cd89209 100644 --- a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorPopupView.php +++ b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorPopupView.php @@ -41,11 +41,27 @@ class UnitTagSelectorPopupView extends View $this->setTemplate('/Modules/Organization/Theme/Backend/Components/UnitTagSelector/unit-selector-popup'); } + /** + * Set the selector id + * + * @param string $id Selector id + * + * @return void + * + * @since 1.0.0 + */ public function setId(string $id) : void { $this->id = $id; } + /** + * Get selector id + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; diff --git a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php index 815a5e2..ed55d34 100644 --- a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php +++ b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php @@ -45,11 +45,25 @@ class UnitTagSelectorView extends View $this->addData('unit-selector-popup', $view); } + /** + * Get selector id + * + * @return string + * + * @since 1.0.0 + */ public function getId() : string { return $this->id; } + /** + * Is required? + * + * @return bool + * + * @since 1.0.0 + */ public function isRequired() : bool { return $this->isRequired;