<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Core\Util\SerializeUtil; class Between extends AbstractFilter { protected $view = null; public function formatId($GR5Ef) { $Zzend = str_replace('.', '_', $GR5Ef); return array('start' => "{$Zzend}_start", 'end' => "{$Zzend}_end"); } protected function formatName($GR5Ef) { goto ZzRjH; zhOQe: if (count($MP7eK) == 1) { $glP3G = $MP7eK[0]; } else { $glP3G = array_shift($MP7eK); foreach ($MP7eK as $GR5Ef) { $glP3G .= "[{$GR5Ef}]"; } } goto UeVO5; UeVO5: return array('start' => "{$glP3G}[start]", 'end' => "{$glP3G}[end]"); goto dWwPx; ZzRjH: $MP7eK = explode('.', $GR5Ef); goto zhOQe; dWwPx: } public function datetime($Ho5Xg = array()) { $this->view = 'admin::filter.betweenDatetime'; $this->prepareForDatetime($Ho5Xg); } protected function prepareForDatetime($Ho5Xg = array()) { goto rUbBz; CUYWk: $MBajs = SerializeUtil::jsonEncode($Ho5Xg); goto eKWnN; eKWnN: $D04fM = SerializeUtil::jsonEncode($Ho5Xg + array('useCurrent' => false)); goto PmSr9; rUbBz: $Ho5Xg['format'] = array_get($Ho5Xg, 'format', 'YYYY-MM-DD HH:mm:ss'); goto cZf8r; cZf8r: $Ho5Xg['locale'] = array_get($Ho5Xg, 'locale', config('app.locale')); goto CUYWk; PmSr9: } public function render() { if (isset($this->view)) { return view($this->view, $this->variables()); } return parent::render(); } }