<?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($cGzJA) { if (isset($cGzJA['has']) && is_array($cGzJA['has'])) { return $this->buildCondition($this->column, $cGzJA['has']); } return null; } public function checkbox($C87JF) { goto JvsoN; JvsoN: $this->field = new Field\Checkbox($this); goto vtll7; zs9Kd: return $this; goto Tep5Q; vtll7: $this->field->options($C87JF); goto zs9Kd; Tep5Q: } public function cascader($C87JF) { goto kmL6o; LlOqe: return $this; goto zjgxS; jgJiV: $this->field->nodes($C87JF); goto LlOqe; kmL6o: $this->field = new Field\Cascader($this); goto jgJiV; zjgxS: } public function cascaderModel($Beeb4, $FeFQB = 'id', $OQ8PB = 'pid', $eXOqL = 'title', $mygAg = 'sort') { goto QDVq5; qKF1e: return $this->cascader($UAm9P); goto XI3gy; QDVq5: $UAm9P = array(); goto FHJdD; FHJdD: foreach (ModelUtil::all($Beeb4, array(), array($FeFQB, $OQ8PB, $eXOqL, $mygAg), array($mygAg, 'asc')) as $nsWl0) { $UAm9P[] = array('id' => $nsWl0[$FeFQB], 'title' => $nsWl0[$eXOqL], 'pid' => $nsWl0[$OQ8PB], 'sort' => $nsWl0[$mygAg]); } goto qKF1e; XI3gy: } }