示例#1
0
 /**
  * {@inheritdoc}
  */
 public function render($data, array $options)
 {
     if (($resource = $this->getValue($data, $options)) === null) {
         return;
     }
     if (!isset($this->cache[$hash = spl_object_hash($options['grid']) . ':' . spl_object_hash($options['column'])])) {
         $this->cache[$hash] = new Column($options['resource_path'], null, $options['type'], $options['options']);
     }
     return $this->renderer->render($options['grid'], $this->cache[$hash], $resource);
 }
示例#2
0
文件: Renderer.php 项目: php-lug/lug
 /**
  * {@inheritdoc}
  */
 public function renderColumn(GridViewInterface $grid, ColumnInterface $column, $data)
 {
     return $this->doRender($grid, 'column', ['column' => $column, 'data' => $data, 'value' => $this->columnRenderer->render($grid, $column, $data)]);
 }