public function getCreate() { WYSIWYG::loadAll(WYSIWYG::TYPE_HTML); $to = $this->request->get('to'); $toId = User::find($to); $this->setTitle(trans('users::message.title.create')); $this->setContent('messages.add', ['to' => !is_null($toId) ? $toId->id : NULL, 'userId' => $this->currentUser->id]); }
public function getEdit($id) { Assets::package(['backbone', 'jquery-ui']); WYSIWYG::loadAll(); $page = $this->getPage($id); $this->setTitle(trans('pages::core.title.pages.edit', ['title' => $page->title])); $this->templateScripts['PAGE'] = $page; $updator = $page->updatedBy()->first(); $creator = $page->createdBy()->first(); $pagesMap = $page->getSitemap(); $behaviorList = BehaviorManager::formChoices(); $this->setContent('pages.edit', compact('page', 'updator', 'creator', 'pagesMap', 'behaviorList')); }