<?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($ZYqjI) { if (isset($ZYqjI['has']) && is_array($ZYqjI['has'])) { return $this->buildCondition($this->column, $ZYqjI['has']); } return null; } public function checkbox($atZJ8) { goto WiBPO; WiBPO: $this->field = new Field\Checkbox($this); goto HNPSr; cnsGU: return $this; goto dlg4Q; HNPSr: $this->field->options($atZJ8); goto cnsGU; dlg4Q: } public function cascader($atZJ8) { goto GODuN; lB19F: $this->field->nodes($atZJ8); goto UvXwg; UvXwg: return $this; goto bKhvg; GODuN: $this->field = new Field\Cascader($this); goto lB19F; bKhvg: } public function cascaderModel($Y2RbY, $yN5bp = 'id', $gKxgP = 'pid', $UkNR1 = 'title', $n9bIH = 'sort') { goto Oauf6; DYAtp: foreach (ModelUtil::all($Y2RbY, array(), array($yN5bp, $gKxgP, $UkNR1, $n9bIH), array($n9bIH, 'asc')) as $V563N) { $xbtey[] = array('id' => $V563N[$yN5bp], 'title' => $V563N[$UkNR1], 'pid' => $V563N[$gKxgP], 'sort' => $V563N[$n9bIH]); } goto IXQ9e; IXQ9e: return $this->cascader($xbtey); goto kx_7v; Oauf6: $xbtey = array(); goto DYAtp; kx_7v: } }