mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-02-10 02:18:40 +00:00
undo serialize deprecation and switch to installExternal api calls
This commit is contained in:
parent
6b5ba93395
commit
e1d19b381d
|
|
@ -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
|
* Create view from template
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,13 @@ 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::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);
|
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,22 +127,4 @@ final class TemplateMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const PRIMARYFIELD ='helper_template_id';
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user