diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 6a24964..a1afba8 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -210,6 +210,13 @@ final class ApiController extends Controller } } + private function createHelperDir(Template $template) : string + { + return '/Modules/Helper/' + . $template->getId() . ' ' + . $template->name; + } + /** * Create view from template * diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 657ec46..f9d935e 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -59,7 +59,13 @@ final class BackendController extends Controller $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response)); $path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/')); - $templates = TemplateMapper::getByVirtualPath($path)->with('tags')->with('tags/title')->where('tags/title/language', $response->getLanguage())->execute(); + $templates = TemplateMapper::getAll() + ->with('createdBy') + ->with('tags') + ->with('tags/title') + ->where('virtualPath', $path) + ->where('tags/title/language', $response->getLanguage()) + ->execute(); list($collection, $parent) = CollectionMapper::getCollectionsByPath($path); diff --git a/Models/TemplateMapper.php b/Models/TemplateMapper.php index 90006d6..4667b9b 100755 --- a/Models/TemplateMapper.php +++ b/Models/TemplateMapper.php @@ -127,22 +127,4 @@ final class TemplateMapper extends DataMapperFactory * @since 1.0.0 */ public const PRIMARYFIELD ='helper_template_id'; - - /** - * Get editor doc based on virtual path. - * - * @param string $virtualPath Virtual path - * - * @return ReadMapper - * - * @since 1.0.0 - */ - public static function getByVirtualPath(string $virtualPath = '/') : ReadMapper - { - return self::getAll() - ->with('createdBy') - ->with('tags') - ->with('tags/title') - ->where('virtualPath', $virtualPath); - } }