/** * @param $value * @param $dataSource * @return mixed */ public function filter($value, IDataSource $dataSource) { $value = strtotime($value); $begin = strtotime('today', $value); $end = strtotime('+1 day', $begin); $dataSource->filter(['%n BETWEEN %s AND %s', $this->column->getColumn(), DateTime::from($begin), DateTime::from($end)]); }
/** * @param $value * @param IDataSource $dataSource * @return mixed|IDataSource */ public function filter($value, IDataSource $dataSource) { if (!is_bool($value)) { if ($value === 'true') { $value = true; } if ($value === 'false') { $value = false; } } $dataSource->filter(['%n = %s', $this->column->getColumn(), $value]); }
/** * @param $value * @param $dataSource * @return mixed */ public function filter($value, IDataSource $dataSource) { $dataSource->filter(['LOWER(%n) LIKE %~like~', $this->column->getColumn(), $value]); }
/** * @param $value * @param IDataSource $dataSource * @return IDataSource */ public function filter($value, IDataSource $dataSource) { $dataSource->filter(['%n = %i', $this->column->getColumn(), $value]); }