diff --git a/Admin/Install/Application/QA/Application.php b/Admin/Install/Application/QA/Application.php index 59c3fc6..b80c531 100755 --- a/Admin/Install/Application/QA/Application.php +++ b/Admin/Install/Application/QA/Application.php @@ -173,7 +173,7 @@ final class Application $head = new Head(); $pageView->setData('unitId', $this->app->unitId); - $pageView->setData('head', $head); + $pageView->data['head'] = $head; $response->set('Content', $pageView); /* App only allows GET */ diff --git a/Admin/Install/Application/QA/index.tpl.php b/Admin/Install/Application/QA/index.tpl.php index fd9d804..ffc3891 100755 --- a/Admin/Install/Application/QA/index.tpl.php +++ b/Admin/Install/Application/QA/index.tpl.php @@ -16,7 +16,7 @@ declare(strict_types=1); use phpOMS\Uri\UriFactory; /** @var phpOMS\Model\Html\Head $head */ -$head = $this->getData('head'); +$head = $this->head; /** @var array $dispatch */ $dispatch = $this->getData('dispatch') ?? []; diff --git a/Admin/Settings/Theme/Backend/settings.tpl.php b/Admin/Settings/Theme/Backend/settings.tpl.php index f742933..262b561 100755 --- a/Admin/Settings/Theme/Backend/settings.tpl.php +++ b/Admin/Settings/Theme/Backend/settings.tpl.php @@ -18,9 +18,9 @@ use phpOMS\Uri\UriFactory; * @var \phpOMS\Views\View $this * @var \Modules\QA\Models\QAApp[] $apps */ -$apps = $this->getData('apps') ?? []; +$apps = $this->data['apps'] ?? []; -echo $this->getData('nav')->render(); ?> +echo $this->data['nav']->render(); ?>
diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 3543fc6..7db82b0 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -49,7 +49,7 @@ final class BackendController extends Controller */ public function setUpBackend(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void { - $head = $response->get('Content')->getData('head'); + $head = $response->get('Content')->head; $head->addAsset(AssetType::CSS, '/Modules/QA/Theme/Backend/styles.css?v=1.0.0'); } @@ -69,7 +69,7 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/QA/Theme/Backend/qa-dashboard'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response); /** @var \Modules\QA\Models\QAQuestion[] $list */ $list = QAQuestionMapper::getAll() @@ -84,11 +84,11 @@ final class BackendController extends Controller ->where('language', $response->header->l11n->language) ->limit(50)->execute(); - $view->setData('questions', $list); + $view->data['questions'] = $list; /** @var \Modules\QA\Models\QAApp[] $apps */ $apps = QAAppMapper::getAll()->execute(); - $view->setData('apps', $apps); + $view->data['apps'] = $apps; return $view; } @@ -109,7 +109,7 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/QA/Theme/Backend/qa-question'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response); /** @var \Modules\QA\Models\QAQuestion $question */ $question = QAQuestionMapper::get() @@ -127,10 +127,10 @@ final class BackendController extends Controller ->where('tags/title/language', $response->header->l11n->language) ->execute(); - $view->addData('question', $question); + $view->data['question'] = $question; $scores = QAHelperMapper::getAccountScore($question->getAccounts()); - $view->addData('scores', $scores); + $view->data['scores'] = $scores; return $view; } @@ -151,11 +151,11 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/QA/Theme/Backend/qa-question-create'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006001001, $request, $response); /** @var \Modules\QA\Models\QAQuestion $question */ $question = QAQuestionMapper::get()->where('id', (int) $request->getData('id'))->execute(); - $view->addData('question', $question); + $view->data['question'] = $question; return $view; } @@ -174,17 +174,17 @@ final class BackendController extends Controller public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface { $view = new View($this->app->l11nManager, $request, $response); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response); $id = $request->getDataString('id') ?? ''; /** @var \Model\Setting[] $settings */ $settings = SettingMapper::getAll()->where('module', $id)->execute(); - $view->setData('settings', $settings); + $view->data['settings'] = $settings; /** @var \Modules\QA\Models\QAApp[] $apps */ $apps = QAAppMapper::getAll()->execute(); - $view->setData('apps', $apps); + $view->data['apps'] = $apps; $view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings'); @@ -206,9 +206,9 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings-app'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response); - $view->addData('app', QAAppMapper::get()->where('id', (int) $request->getData('app'))->execute()); + $view->data['app'] = QAAppMapper::get()->where('id', (int) $request->getData('app'))->execute(); return $view; } diff --git a/Theme/Backend/qa-dashboard.tpl.php b/Theme/Backend/qa-dashboard.tpl.php index 774213f..612a135 100755 --- a/Theme/Backend/qa-dashboard.tpl.php +++ b/Theme/Backend/qa-dashboard.tpl.php @@ -15,12 +15,12 @@ declare(strict_types=1); use phpOMS\Uri\UriFactory; /** @var \Modules\QA\Modles\QAQuestion[] $questions */ -$questions = $this->getData('questions'); +$questions = $this->data['questions']; /** @var \Modules\QA\Modles\QAApp[] $apps */ -$apps = $this->getData('apps'); +$apps = $this->data['apps']; -echo $this->getData('nav')->render(); ?> +echo $this->data['nav']->render(); ?>
diff --git a/Theme/Backend/qa-question.tpl.php b/Theme/Backend/qa-question.tpl.php index 784a2d2..5d4612d 100755 --- a/Theme/Backend/qa-question.tpl.php +++ b/Theme/Backend/qa-question.tpl.php @@ -15,15 +15,15 @@ declare(strict_types=1); use phpOMS\Uri\UriFactory; /** @var \Modules\QA\Models\QAQuestion $question */ -$question = $this->getData('question'); +$question = $this->data['question']; /** @var \Modules\QA\Models\QAAnswer[] $answers */ $answers = $question->getAnswersByScore(); /** @var array $scores */ -$scores = $this->getData('scores'); +$scores = $this->data['scores']; -echo $this->getData('nav')->render(); +echo $this->data['nav']->render(); ?>
diff --git a/Theme/Backend/qa-tag-edit.tpl.php b/Theme/Backend/qa-tag-edit.tpl.php index 739d6f4..6213df6 100755 --- a/Theme/Backend/qa-tag-edit.tpl.php +++ b/Theme/Backend/qa-tag-edit.tpl.php @@ -12,10 +12,10 @@ */ declare(strict_types=1); -$tag = $this->getData('tag'); +$tag = $this->data['tag']; /** @var \phpOMS\Views\View $this */ -echo $this->getData('nav')->render(); +echo $this->data['nav']->render(); ?>
diff --git a/Theme/Backend/qa-tag-list.tpl.php b/Theme/Backend/qa-tag-list.tpl.php index 8ec157b..8209641 100755 --- a/Theme/Backend/qa-tag-list.tpl.php +++ b/Theme/Backend/qa-tag-list.tpl.php @@ -12,10 +12,10 @@ */ declare(strict_types=1); -$tags = $this->getData('tags'); +$tags = $this->data['tags']; /** @var \phpOMS\Views\View $this */ -echo $this->getData('nav')->render(); +echo $this->data['nav']->render(); ?>