<?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($r8NJk) { if (isset($r8NJk['has']) && is_array($r8NJk['has'])) { return $this->buildCondition($this->column, $r8NJk['has']); } return null; } public function checkbox($Tpa5t) { goto CTp5R; CTp5R: $this->field = new Field\Checkbox($this); goto nVxJy; XakAC: return $this; goto SyySw; nVxJy: $this->field->options($Tpa5t); goto XakAC; SyySw: } public function cascader($Tpa5t) { goto XaoZq; e7YWz: return $this; goto izNDr; XaoZq: $this->field = new Field\Cascader($this); goto QYuS4; QYuS4: $this->field->nodes($Tpa5t); goto e7YWz; izNDr: } public function cascaderModel($tkusQ, $H7dHQ = 'id', $FV1UP = 'pid', $nH3zg = 'title', $CZj6g = 'sort') { goto C3q30; i1oUs: foreach (ModelUtil::all($tkusQ, array(), array($H7dHQ, $FV1UP, $nH3zg, $CZj6g), array($CZj6g, 'asc')) as $yFnpO) { $u5cUO[] = array('id' => $yFnpO[$H7dHQ], 'title' => $yFnpO[$nH3zg], 'pid' => $yFnpO[$FV1UP], 'sort' => $yFnpO[$CZj6g]); } goto Y_OXt; C3q30: $u5cUO = array(); goto i1oUs; Y_OXt: return $this->cascader($u5cUO); goto VU4u8; VU4u8: } }