<?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($d7NKF) { if (isset($d7NKF['has']) && is_array($d7NKF['has'])) { return $this->buildCondition($this->column, $d7NKF['has']); } return null; } public function checkbox($X3Hkn) { goto eNiuD; eNiuD: $this->field = new Field\Checkbox($this); goto GW2N5; GW2N5: $this->field->options($X3Hkn); goto gDNoY; gDNoY: return $this; goto pJ14i; pJ14i: } public function cascader($X3Hkn) { goto nFF03; QrOmm: $this->field->nodes($X3Hkn); goto LcouW; nFF03: $this->field = new Field\Cascader($this); goto QrOmm; LcouW: return $this; goto FcjN0; FcjN0: } public function cascaderModel($zWXdn, $P1B51 = 'id', $u20lS = 'pid', $UOlew = 'title', $hGl_A = 'sort') { goto HJpg6; uPSJR: foreach (ModelUtil::all($zWXdn, array(), array($P1B51, $u20lS, $UOlew, $hGl_A), array($hGl_A, 'asc')) as $El_MH) { $mpKYz[] = array('id' => $El_MH[$P1B51], 'title' => $El_MH[$UOlew], 'pid' => $El_MH[$u20lS], 'sort' => $El_MH[$hGl_A]); } goto A8gk4; A8gk4: return $this->cascader($mpKYz); goto aQy2D; HJpg6: $mpKYz = array(); goto uPSJR; aQy2D: } }