undo serialize deprecation and switch to installExternal api calls

This commit is contained in:
Dennis Eichhorn 2022-03-26 15:01:45 +01:00
parent 6b5ba93395
commit e1d19b381d
3 changed files with 14 additions and 19 deletions

View File

@ -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
*

View File

@ -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);

View File

@ -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);
}
}