/** * The backend name for the code * @return string */ public function BackendName() { $result = 'code'; if (!$this->content) { return $result; } $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content); $code = Text::Shorten($htmlCode->GetCode()); if ($code) { $result .= ' - ' . $code; } return $result; }
/** * Attaches properties to the html code element * @return ContentHtmlCode Returns the saved html codes */ protected function SaveElement() { $this->htmlCode->SetCode($this->Value('Code')); return $this->htmlCode; }