initLocale(); } /** * {@inheritDoc} */ public function render() { $this->actAsParent(); $parentContent = parent::render(); $this->actAsParent(false); if (!$this->isAvailable) { return $parentContent; } $this->vars['richeditor'] = $parentContent; return $this->makePartial('mlricheditor'); } public function prepareVars() { parent::prepareVars(); $this->prepareLocaleVars(); } /** * Returns an array of translated values for this field * @return array */ public function getSaveValue($value) { return $this->getLocaleSaveValue($value); } /** * {@inheritDoc} */ protected function loadAssets() { $this->actAsParent(); parent::loadAssets(); $this->actAsParent(false); if (Locale::isAvailable()) { $this->loadLocaleAssets(); $this->addJs('js/mlricheditor.js'); } } /** * {@inheritDoc} */ public function onLoadPageLinksForm() { $this->actAsParent(); return parent::onLoadPageLinksForm(); } /** * {@inheritDoc} */ protected function getParentViewPath() { return base_path().'/modules/backend/formwidgets/richeditor/partials'; } /** * {@inheritDoc} */ protected function getParentAssetPath() { return '/modules/backend/formwidgets/richeditor/assets'; } }