<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Grid\Filter\Field\Datetime; class Range extends AbstractFilter { public function condition($ADVMQ) { if (isset($ADVMQ['range']) && ($ADVMQ['range']['min'] || $ADVMQ['range']['max'])) { goto C0G0Q; jl7mz: return $this->buildCondition($this->column, array($HDpl6['min'], $HDpl6['max'])); goto Qh9Uy; yO0At: $this->query = 'whereBetween'; goto jl7mz; QzNLJ: if (!isset($HDpl6['max'])) { return $this->buildCondition($this->column, '>=', $HDpl6['min']); } goto yO0At; FvjBR: if (!isset($HDpl6['min'])) { return $this->buildCondition($this->column, '<=', $HDpl6['max']); } goto QzNLJ; C0G0Q: $HDpl6 = $ADVMQ['range']; goto FvjBR; Qh9Uy: } 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; } }