<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter\Field; use ModStart\Core\Exception\BizException; use ModStart\Core\Type\BaseType; class Cascader extends AbstractFilterField { protected $nodes = array(); protected function setup() { $this->addFluentAttributeVariable('nodes'); } public function nodes($pWf7i = null) { goto aqxi1; aqxi1: if (null === $pWf7i) { return $this->nodes; } goto M9XdF; f7mTQ: $this->nodes = $HDpl6; goto KflB4; M9XdF: if (is_string($pWf7i) && is_subclass_of($pWf7i, BaseType::class)) { goto tfrjn; pqaON: $DAOXQ = 1; goto j9fWp; tfrjn: $HDpl6 = array(); goto pqaON; j9fWp: foreach ($pWf7i::getList() as $pztz4 => $Q0rz2) { $HDpl6[] = array('id' => $pztz4, 'pid' => 0, 'title' => $Q0rz2, 'sort' => $DAOXQ++); } goto zpDtA; zpDtA: } else { if (is_array($pWf7i)) { $HDpl6 = $pWf7i; } else { BizException::throws('Select nodes error'); } } goto f7mTQ; KflB4: } }