<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; class Between extends AbstractFilter { protected $view = null; public function formatId($gnky8) { $sIQGl = str_replace('.', '_', $gnky8); return array('start' => "{$sIQGl}_start", 'end' => "{$sIQGl}_end"); } protected function formatName($gnky8) { goto SBe3o; pkoB7: if (count($hSGtJ) == 1) { $rPkIY = $hSGtJ[0]; } else { $rPkIY = array_shift($hSGtJ); foreach ($hSGtJ as $gnky8) { $rPkIY .= "[{$gnky8}]"; } } goto KwUwr; SBe3o: $hSGtJ = explode('.', $gnky8); goto pkoB7; KwUwr: return array('start' => "{$rPkIY}[start]", 'end' => "{$rPkIY}[end]"); goto zx9oz; zx9oz: } public function datetime($X3Hkn = array()) { $this->view = 'admin::filter.betweenDatetime'; $this->prepareForDatetime($X3Hkn); } protected function prepareForDatetime($X3Hkn = array()) { goto PNBpi; PNBpi: $X3Hkn['format'] = array_get($X3Hkn, 'format', 'YYYY-MM-DD HH:mm:ss'); goto K5xWI; ftKwd: $ydWYp = json_encode($X3Hkn + array('useCurrent' => false)); goto qDvJq; C0BEm: $uGQrA = json_encode($X3Hkn); goto ftKwd; K5xWI: $X3Hkn['locale'] = array_get($X3Hkn, 'locale', config('app.locale')); goto C0BEm; qDvJq: } public function render() { if (isset($this->view)) { return view($this->view, $this->variables()); } return parent::render(); } }