<?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($ADVMQ) { if (isset($ADVMQ['has']) && is_array($ADVMQ['has'])) { return $this->buildCondition($this->column, $ADVMQ['has']); } return null; } public function checkbox($Bodfy) { goto Gv9yu; Gv9yu: $this->field = new Field\Checkbox($this); goto M9sR4; M9sR4: $this->field->options($Bodfy); goto s3c0Z; s3c0Z: return $this; goto oVWVV; oVWVV: } public function cascader($Bodfy) { goto WntG2; s0OwK: return $this; goto CHF1J; eKNyc: $this->field->nodes($Bodfy); goto s0OwK; WntG2: $this->field = new Field\Cascader($this); goto eKNyc; CHF1J: } public function cascaderModel($wyCKK, $de0LK = 'id', $cEYRg = 'pid', $vZ8Uk = 'title', $N36Ze = 'sort') { goto Iezj2; Iezj2: $pWf7i = array(); goto awFkO; awFkO: foreach (ModelUtil::all($wyCKK, array(), array($de0LK, $cEYRg, $vZ8Uk, $N36Ze), array($N36Ze, 'asc')) as $OV1o4) { $pWf7i[] = array('id' => $OV1o4[$de0LK], 'title' => $OV1o4[$vZ8Uk], 'pid' => $OV1o4[$cEYRg], 'sort' => $OV1o4[$N36Ze]); } goto eKec0; eKec0: return $this->cascader($pWf7i); goto QollG; QollG: } }