Пример #1
0
 /**
  * Render an object to a string
  * 
  * @param Wire|object $value
  * @return string
  * 
  */
 protected function objectToString($value)
 {
     if ($value instanceof WireArray && !$value->count()) {
         return '';
     }
     if ($value instanceof Page) {
         return $value->get('title|name');
     }
     if ($value instanceof Pagefiles || $value instanceof Pagefile) {
         $out = $this->renderInputfieldValue($value);
     } else {
         $className = get_class($value);
         $out = (string) $value;
         if ($out === $className) {
             // just the class name probably isn't useful here, see if we can do do something else with it
             $this->renderIsUseless = true;
         }
     }
     return $out;
 }