<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Type\BaseType; class Has extends AbstractFilter { protected $query = 'whereIn'; public function condition($GWC6A) { if (isset($GWC6A['has']) && is_array($GWC6A['has'])) { return $this->buildCondition($this->column, $GWC6A['has']); } return null; } public function checkbox($ZNmAK) { goto n5_B6; CCT3J: return $this; goto qCMTd; O6peo: $this->field->options($ZNmAK); goto CCT3J; n5_B6: $this->field = new Field\Checkbox($this); goto O6peo; qCMTd: } public function cascader($ZNmAK) { goto CE2kg; QWRLz: return $this; goto GXgvT; vdhvL: $this->field->nodes($ZNmAK); goto QWRLz; CE2kg: $this->field = new Field\Cascader($this); goto vdhvL; GXgvT: } public function cascaderModel($oAD_e, $eSxAt = 'id', $X7q5j = 'pid', $oFmeV = 'title', $I4VL7 = 'sort') { goto G0Bl0; xstCd: foreach (ModelUtil::all($oAD_e, array(), array($eSxAt, $X7q5j, $oFmeV, $I4VL7), array($I4VL7, 'asc')) as $ZpLX1) { $JtdYi[] = array('id' => $ZpLX1[$eSxAt], 'title' => $ZpLX1[$oFmeV], 'pid' => $ZpLX1[$X7q5j], 'sort' => $ZpLX1[$I4VL7]); } goto dDPo4; G0Bl0: $JtdYi = array(); goto xstCd; dDPo4: return $this->cascader($JtdYi); goto rWuMP; rWuMP: } }