From a5fc4892ac278260e14d452f2feadd6deea96cff Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 18 May 2017 19:54:25 +0200 Subject: [PATCH] First small component implemented --- .../AccountGroupSelector/BaseView.php | 50 +++++++++++++++++++ .../AccountGroupSelector/PopupView.php | 0 .../AccountGroupSelector/base.tpl.php | 22 ++++++++ .../AccountGroupSelector/popup.tpl.php} | 8 +-- 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 Theme/Backend/Components/AccountGroupSelector/BaseView.php create mode 100644 Theme/Backend/Components/AccountGroupSelector/PopupView.php create mode 100644 Theme/Backend/Components/AccountGroupSelector/base.tpl.php rename Theme/Backend/{acc-grp-popup.tpl.php => Components/AccountGroupSelector/popup.tpl.php} (85%) diff --git a/Theme/Backend/Components/AccountGroupSelector/BaseView.php b/Theme/Backend/Components/AccountGroupSelector/BaseView.php new file mode 100644 index 0000000..9d91659 --- /dev/null +++ b/Theme/Backend/Components/AccountGroupSelector/BaseView.php @@ -0,0 +1,50 @@ + + * @author Dennis Eichhorn + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +declare(strict_types=1); + +namespace Modules\Profile\Theme\Backend\Components\AccountGroupSelector; + +use phpOMS\Views\View; +use phpOMS\ApplicationAbstract; +use phpOMS\Message\RequestAbstract; +use phpOMS\Message\ResponseAbstract; + +class BaseView extends View +{ + private $id = ''; + + public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response) + { + parent::__construct($app, $request, $response); + $this->setTemplate('/Modules/Profile/Theme/Backend/Components/AccountGroupSelector/base'); + + $view = new View($app, $request, $response); + $view->setTemplate('/Modules/Profile/Theme/Backend/Components/AccountGroupSelector/popup'); + + $this->addData('popup', $view); + } + + public function getId() : string + { + return $this->id; + } + + public function render(...$data) : string + { + $this->id = $data[0]; + return parent::render(null); + } +} \ No newline at end of file diff --git a/Theme/Backend/Components/AccountGroupSelector/PopupView.php b/Theme/Backend/Components/AccountGroupSelector/PopupView.php new file mode 100644 index 0000000..e69de29 diff --git a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php new file mode 100644 index 0000000..a2eb01e --- /dev/null +++ b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/Theme/Backend/acc-grp-popup.tpl.php b/Theme/Backend/Components/AccountGroupSelector/popup.tpl.php similarity index 85% rename from Theme/Backend/acc-grp-popup.tpl.php rename to Theme/Backend/Components/AccountGroupSelector/popup.tpl.php index 94d2f2f..c226866 100644 --- a/Theme/Backend/acc-grp-popup.tpl.php +++ b/Theme/Backend/Components/AccountGroupSelector/popup.tpl.php @@ -6,13 +6,13 @@
-
-