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