/** * 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; }
/** * Gets the content html schema * @return \Phine\Database\BuiltIn\ContentHtmlCodeSchema */ protected function ElementSchema() { return ContentHtmlCode::Schema(); }