/** * @return JsonResponse */ public function getListForXEditable() { $collection = $this->collection->getHTMLSelectChoices(); $data = array_map(function ($value, $key) { return ['id' => $key, 'text' => $value]; }, $collection, array_keys($collection)); return new JsonResponse($data); }
/** * @param null|string $filename * * @return mixed */ public function getFile($filename = null) { WYSIWYG::loadAllEditors(); if (is_null($filename)) { return $this->collection->newFile(); } if ($file = $this->collection->findFile($filename)) { return $file; } $this->throwFailException($this->smartRedirect()->withErrors(trans($this->wrapNamespace("{$this->sectionPrefix}.messages.not_found")))); }
public function __construct() { return parent::__construct(snippets_path(), 'snippets'); }
public function __construct() { return parent::__construct(layouts_path()); }
public function __construct() { parent::__construct(layouts_path(), 'layouts'); }