Ublaboo\DataGrid\DataGrid::getRowCondition PHP Method

getRowCondition() public method

public getRowCondition ( string $name, string | null $key = NULL ) : boolean | callable
$name string
$key string | null
return boolean | callable
    public function getRowCondition($name, $key = NULL)
    {
        if (!isset($this->row_conditions[$name])) {
            return FALSE;
        }
        $condition = $this->row_conditions[$name];
        if (!$key) {
            return $condition;
        }
        return isset($condition[$key]) ? $condition[$key] : FALSE;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Has particular row and action allowed?
  * @param  mixed  $key
  * @return bool
  */
 public function hasAction($key)
 {
     $condition = $this->datagrid->getRowCondition('action', $key);
     return $condition ? $condition($this->item) : TRUE;
 }
All Usage Examples Of Ublaboo\DataGrid\DataGrid::getRowCondition
DataGrid