<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Grid\Filter\Field\Datetime; class Range extends AbstractFilter { public function condition($JnEKk) { if (isset($JnEKk['range']) && ($JnEKk['range']['min'] || $JnEKk['range']['max'])) { goto FAcfu; yOrAc: if (!isset($Gttsd['min'])) { return $this->buildCondition($this->column, '<=', $Gttsd['max']); } goto j1o_B; j1o_B: if (!isset($Gttsd['max'])) { return $this->buildCondition($this->column, '>=', $Gttsd['min']); } goto yZIl8; FAcfu: $Gttsd = $JnEKk['range']; goto yOrAc; FfKet: return $this->buildCondition($this->column, array($Gttsd['min'], $Gttsd['max'])); goto UCnpX; yZIl8: $this->query = 'whereBetween'; goto FfKet; UCnpX: } return null; } public function datetime() { $this->field = new Field\Datetime($this); return $this; } public function date() { $this->field = new Field\Date($this); return $this; } public function text() { $this->field = new Field\Text($this); return $this; } public function number() { $this->field = new Field\Number($this); return $this; } }