Grido\Components\Columns\Column::setFilterSelect PHP Method

setFilterSelect() public method

public setFilterSelect ( array $items = NULL ) : Grido\Components\Filters\Select
$items array
return Grido\Components\Filters\Select
    public function setFilterSelect(array $items = NULL)
    {
        return $this->grid->addFilterSelect($this->getName(), $this->label, $items);
    }

Usage Example

 /**
  * @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;
 }