diff --git a/Controller/BackendController.php b/Controller/BackendController.php index f842fac..eb0f0d4 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -49,7 +49,7 @@ final class BackendController extends Controller $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Tag/Theme/Backend/tag-create'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response); return $view; } @@ -71,35 +71,29 @@ final class BackendController extends Controller $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Tag/Theme/Backend/tag-list'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response)); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response); if ($request->getData('ptype') === 'p') { - $view->setData('tags', - TagMapper::getAll() + $view->data['tags'] = TagMapper::getAll() ->with('title') ->where('id', $request->getDataInt('id') ?? 0, '<') ->where('title/language', $request->header->l11n->language) ->limit(25) - ->execute() - ); + ->execute(); } elseif ($request->getData('ptype') === 'n') { - $view->setData('tags', - TagMapper::getAll() + $view->data['tags'] = TagMapper::getAll() ->with('title') ->where('id', $request->getDataInt('id') ?? 0, '>') ->where('title/language', $request->header->l11n->language) ->limit(25) - ->execute() - ); + ->execute(); } else { - $view->setData('tags', - TagMapper::getAll() + $view->data['tags'] = TagMapper::getAll() ->with('title') ->where('id', 0, '>') ->where('title/language', $request->header->l11n->language) ->limit(25) - ->execute() - ); + ->execute(); } return $view; @@ -129,15 +123,15 @@ final class BackendController extends Controller ->execute(); $view->setTemplate('/Modules/Tag/Theme/Backend/tag-single'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response)); - $view->addData('tag', $tag); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1007501001, $request, $response); + $view->data['tag'] = $tag; /** @var \phpOMS\Localization\BaseStringL11n[] $l11n */ $l11n = TagL11nMapper::getAll() ->where('ref', $tag->id) ->execute(); - $view->addData('l11n', $l11n); + $view->data['l11n'] = $l11n; return $view; } diff --git a/Theme/Backend/tag-create.tpl.php b/Theme/Backend/tag-create.tpl.php index 12181fe..3db259b 100755 --- a/Theme/Backend/tag-create.tpl.php +++ b/Theme/Backend/tag-create.tpl.php @@ -15,7 +15,7 @@ declare(strict_types=1); use phpOMS\Uri\UriFactory; /** @var \phpOMS\Views\View $this */ -echo $this->getData('nav')->render(); ?> +echo $this->data['nav']->render(); ?>