예제 #1
0
파일: BaseColumn.php 프로젝트: gr00d/admin
 /**
  * Render column cell
  *
  * @param $instance
  * @param int $totalCount
  * @param string $content
  * @return string
  */
 public function render($instance, $totalCount, $content = null)
 {
     if (is_null($content)) {
         $content = $this->valueFromInstance($instance, $this->name);
     }
     $content = $this->renderAppends($instance, $totalCount, $content);
     return $this->htmlBuilder->tag('td', $this->getAttributesForCell($instance), $content);
 }
예제 #2
0
 /**
  * Render column header
  *
  * @return string
  */
 public function renderHeader()
 {
     return $this->htmlBuilder->tag('th', $this->getAttributesForHeader(), $this->label);
 }
예제 #3
0
 /**
  * @return string
  */
 protected function renderSingleItem()
 {
     $content = $this->htmlBuilder->tag('i', ['class' => ['fa', 'fa-fw', $this->getIcon()]]);
     $content .= ' ' . $this->getLabel();
     return $this->htmlBuilder->tag('a', ['href' => $this->getUrl()], $content);
 }