/** * renderValidationJS * TEMPORARY SOLUTION to 'override' original renderValidationJS method * with custom XoopsEditor's renderValidationJS method * * @return string|false */ public function renderValidationJS() { if ($this->editor instanceof \XoopsEditor && $this->isRequired()) { if (method_exists($this->editor, 'renderValidationJS')) { $this->editor->setName($this->getName()); $this->editor->setCaption($this->getCaption()); $this->editor->setRequired($this->isRequired()); $ret = $this->editor->renderValidationJS(); return $ret; } else { parent::renderValidationJS(); } } return false; }
/** * renderValidationJS * * @return bool|string */ public function renderValidationJS() { if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderValidationJS')) { if (!isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) { return $this->htmlEditor->renderValidationJS(); } } return parent::renderValidationJS(); }