mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-02 03:38:41 +00:00
draft ::with() function for models
This commit is contained in:
parent
26c596d0dc
commit
9bb5f561c2
|
|
@ -101,7 +101,7 @@ final class BackendController extends Controller
|
|||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response));
|
||||
|
||||
$path = \str_replace('+', ' ', (string) ($request->getData('path') ?? '/'));
|
||||
$docs = EditorDocMapper::withConditional('language', $response->getLanguage())::getByVirtualPath($path, $request->header->account);
|
||||
$docs = EditorDocMapper::with('language', $response->getLanguage())::getByVirtualPath($path, $request->header->account);
|
||||
|
||||
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ final class BackendController extends Controller
|
|||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
/** @var \Modules\Editor\Models\EditorDoc $doc */
|
||||
$doc = EditorDocMapper::withConditional('language', $response->getLanguage())::get((int) $request->getData('id'));
|
||||
$doc = EditorDocMapper::with('language', $response->getLanguage())::get((int) $request->getData('id'));
|
||||
$accountId = $request->header->account;
|
||||
|
||||
if ($doc->createdBy->getId() !== $accountId
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user