<?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($JtdYi = null) { goto VhjR0; sc7FP: $this->nodes = $wvO30; goto o_54m; fohY2: if (is_string($JtdYi) && is_subclass_of($JtdYi, BaseType::class)) { goto jui7H; qi8Ft: foreach ($JtdYi::getList() as $plrwN => $uTz0e) { $wvO30[] = array('id' => $plrwN, 'pid' => 0, 'title' => $uTz0e, 'sort' => $JoMPx++); } goto dFA3W; jui7H: $wvO30 = array(); goto rsTwP; rsTwP: $JoMPx = 1; goto qi8Ft; dFA3W: } else { if (is_array($JtdYi)) { $wvO30 = $JtdYi; } else { BizException::throws('Select nodes error'); } } goto sc7FP; VhjR0: if (null === $JtdYi) { return $this->nodes; } goto fohY2; o_54m: } }