<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; class Between extends AbstractFilter { protected $view = null; public function formatId($VDtGk) { $T6TGt = str_replace('.', '_', $VDtGk); return array('start' => "{$T6TGt}_start", 'end' => "{$T6TGt}_end"); } protected function formatName($VDtGk) { goto TGkDS; TGkDS: $yzTZe = explode('.', $VDtGk); goto h7IwO; yqcg4: return array('start' => "{$sQIr6}[start]", 'end' => "{$sQIr6}[end]"); goto pXyDL; h7IwO: if (count($yzTZe) == 1) { $sQIr6 = $yzTZe[0]; } else { $sQIr6 = array_shift($yzTZe); foreach ($yzTZe as $VDtGk) { $sQIr6 .= "[{$VDtGk}]"; } } goto yqcg4; pXyDL: } public function datetime($nO0o6 = array()) { $this->view = 'admin::filter.betweenDatetime'; $this->prepareForDatetime($nO0o6); } protected function prepareForDatetime($nO0o6 = array()) { goto rixSX; pVOKZ: $wKCFI = json_encode($nO0o6 + array('useCurrent' => false)); goto owAVJ; Epmk6: $nO0o6['locale'] = array_get($nO0o6, 'locale', config('app.locale')); goto DiD7C; DiD7C: $xaYrF = json_encode($nO0o6); goto pVOKZ; rixSX: $nO0o6['format'] = array_get($nO0o6, 'format', 'YYYY-MM-DD HH:mm:ss'); goto Epmk6; owAVJ: } public function render() { if (isset($this->view)) { return view($this->view, $this->variables()); } return parent::render(); } }