示例#1
0
 public function render(ObjectInterface $attribute)
 {
     $template = null;
     /** @var KeyValuePair $attribute */
     if ($attribute->isCanBeShort()) {
         $template = new Template(Config::get(['renderer', 'templates', 'default', 'shortAttribute'], ''));
     } else {
         $template = new Template(Config::get(['renderer', 'templates', 'default', 'attribute'], ''));
     }
     if ($template === null) {
         return '';
     }
     return $template->getString($this, $attribute);
 }