mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-02-08 01:18:40 +00:00
draft ::with() function for models
This commit is contained in:
parent
00a035f4ff
commit
fa0305b87d
|
|
@ -58,7 +58,7 @@ final class BackendController extends Controller
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response));
|
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response));
|
||||||
|
|
||||||
$path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/'));
|
$path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/'));
|
||||||
$templates = TemplateMapper::withConditional('language', $response->getLanguage())::getByVirtualPath($path);
|
$templates = TemplateMapper::with('language', $response->getLanguage())::getByVirtualPath($path);
|
||||||
|
|
||||||
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);
|
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ final class BackendController extends Controller
|
||||||
//$file = preg_replace('([^\w\s\d\-_~,;:\.\[\]\(\).])', '', $template->getName());
|
//$file = preg_replace('([^\w\s\d\-_~,;:\.\[\]\(\).])', '', $template->getName());
|
||||||
|
|
||||||
/** @var Template $template */
|
/** @var Template $template */
|
||||||
$template = TemplateMapper::withConditional('language', $response->getLanguage())::get((int) $request->getData('id'));
|
$template = TemplateMapper::with('language', $response->getLanguage())::get((int) $request->getData('id'));
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Helper/Theme/Backend/helper-single');
|
$view->setTemplate('/Modules/Helper/Theme/Backend/helper-single');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user