<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Core\Dao\ModelUtil; class Eq extends AbstractFilter { public function cascader($X3Hkn) { goto qtg79; l033o: $this->field->options($X3Hkn); goto PrwJy; PrwJy: return $this; goto rzd0N; qtg79: $this->field = new Field\Cascader($this); goto l033o; rzd0N: } public function select($X3Hkn) { goto BME2O; C_eMU: return $this; goto DCOYG; BME2O: $this->field = new Field\Select($this); goto vxwoV; vxwoV: $this->field->options($X3Hkn); goto C_eMU; DCOYG: } public function selectArray($X3Hkn, $vxAjc = 'id', $sDsFk = 'title') { $X3Hkn = array_build($X3Hkn, function ($kh68j, $tHq0l) use($vxAjc, $sDsFk) { return array($tHq0l[$vxAjc], $tHq0l[$sDsFk]); }); return $this->select($X3Hkn); } public function selectModel($zWXdn, $ZL1Sk = 'id', $sOJld = 'name', $g09Lt = array()) { return $this->select(ModelUtil::valueMap($zWXdn, $ZL1Sk, $sOJld, $g09Lt)); } public function radio($X3Hkn) { goto Oq9RG; Oq9RG: $this->field = new Field\Radio($this); goto tYUHV; tYUHV: $this->field->options($X3Hkn); goto YznHP; YznHP: return $this; goto Nmd8A; Nmd8A: } public function switchRadioYesNo() { goto HTONK; HTONK: $this->field = new Field\Radio($this); goto vVdMp; T5isz: return $this; goto BeZAt; vVdMp: $this->field->options(array('0' => L('No'), '1' => L('Yes'))); goto T5isz; BeZAt: } public function switchRadioOnOff() { goto SQ2AP; GCs9F: $this->field->options(array('0' => L('Off'), '1' => L('On'))); goto Q8kbs; Q8kbs: return $this; goto XD_LN; SQ2AP: $this->field = new Field\Radio($this); goto GCs9F; XD_LN: } public function switchSelectYesNo() { goto WK79_; pX9LD: return $this; goto dQ_D_; G2B3F: $this->field->options(array('0' => L('No'), '1' => L('Yes'))); goto pX9LD; WK79_: $this->field = new Field\Select($this); goto G2B3F; dQ_D_: } public function switchSelectOnOff() { goto CknP0; He936: return $this; goto lD9te; d6GvM: $this->field->options(array('0' => L('Off'), '1' => L('On'))); goto He936; CknP0: $this->field = new Field\Select($this); goto d6GvM; lD9te: } }