Example #1
0
 public function val($value = null)
 {
     if (is_array($value)) {
         $value = json_encode($value);
     }
     return parent::val($value);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function valToHtml()
 {
     $html = strip_tags(parent::valToHtml(), '<strong><em>');
     if (empty($html)) {
         return '';
     }
     if (strlen($html) > 200) {
         $html = substr($html, 0, 200) . '...';
     }
     return "<p>{$html}</p>";
 }