/** * The backend name * @return string The name as displayed in backend trees */ public function BackendName() { $result = 'html wrap'; if (!$this->content) { return $result; } $html = ContentHtmlWrap::Schema()->ByContent($this->content); $text = Text::Shorten($html->GetHtml()); if ($text) { return $result . ' - ' . $text; } else { if ($this->content->GetCssID()) { return $result . ' #' . $this->content->GetCssID(); } else { if ($this->content->GetCssClass()) { return $result . ' .' . $this->content->GetCssClass(); } } } return $result; }
/** * Gets the content html schema * @return \Phine\Database\BuiltIn\ContentHtmlWrapSchema */ protected function ElementSchema() { return ContentHtmlWrap::Schema(); }