Grido\Components\Columns\Column::setFilterSelect PHP Метод

setFilterSelect() публичный Метод

public setFilterSelect ( array $items = NULL ) : Grido\Components\Filters\Select
$items array
Результат Grido\Components\Filters\Select
    public function setFilterSelect(array $items = NULL)
    {
        return $this->grid->addFilterSelect($this->getName(), $this->label, $items);
    }

Usage Example

Пример #1
0
 /**
  * @param \Grido\Components\Columns\Column $column
  * @return \Grido\Components\Columns\Column
  */
 public function setupAsBool(\Grido\Components\Columns\Column $column)
 {
     $col = $column->getColumn();
     $column->setSortable();
     $column->setFilterSelect($this->yesNoArray);
     $column->setCustomRender(function ($row) use($col) {
         if (!isset($this->yesNoArray[$row[$col]])) {
             return NULL;
         }
         return $this->yesNoArray[$row[$col]];
     });
     return $column;
 }