Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 public function BackendName()
 {
     $result = 'html';
     if (!$this->content) {
         return $result;
     }
     $html = ContentHtml::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;
 }