<?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($AgbcE) { if (isset($AgbcE['has']) && is_array($AgbcE['has'])) { return $this->buildCondition($this->column, $AgbcE['has']); } return null; } public function checkbox($RKwZR) { goto KsJd2; X8ue2: $this->field->options($RKwZR); goto TD7tF; TD7tF: return $this; goto a0qKE; KsJd2: $this->field = new Field\Checkbox($this); goto X8ue2; a0qKE: } public function cascader($RKwZR) { goto psGZV; psGZV: $this->field = new Field\Cascader($this); goto EQ9g5; YTkBy: return $this; goto WZRSC; EQ9g5: $this->field->nodes($RKwZR); goto YTkBy; WZRSC: } public function cascaderModel($AD05J, $E4jaq = 'id', $Max4F = 'pid', $gPHex = 'title', $XpGiP = 'sort') { goto CryC7; RE4x7: return $this->cascader($SLm7t); goto VgHVw; moPPB: foreach (ModelUtil::all($AD05J, array(), array($E4jaq, $Max4F, $gPHex, $XpGiP), array($XpGiP, 'asc')) as $Esk0p) { $SLm7t[] = array('id' => $Esk0p[$E4jaq], 'title' => $Esk0p[$gPHex], 'pid' => $Esk0p[$Max4F], 'sort' => $Esk0p[$XpGiP]); } goto RE4x7; CryC7: $SLm7t = array(); goto moPPB; VgHVw: } }