Example #1
0
 /**
  * Constructor
  *
  * @param $name
  * @param string $label
  * @param string $link
  * @param array $binds
  * @param array $attr
  */
 public function __construct($name, $label = '%s', $link = '#', $binds = [], $attr = [])
 {
     parent::__construct($name, $label, $link, $binds, $attr);
     $this->setSizeAsExtraSmall();
 }
Example #2
0
 /**
  * Render link column
  *
  * @param \FrenchFrogs\Table\Column\Link $column
  * @param array $row
  * @return string
  */
 public function link(Column\Link $column, array $row)
 {
     if ($column->isRemote()) {
         $column->addAttribute('data-target', '#' . $column->getRemoteId())->addAttribute('data-toggle', 'modal');
     } elseif ($column->isCallback()) {
         $column->addClass('callback-remote');
     }
     $html = html('a', ['href' => $column->getBindedLink($row)], $column->getValue($row));
     return $this->post($html, $column, $row);
 }