<?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($u5cUO = null) { goto UvnHC; UvnHC: if (null === $u5cUO) { return $this->nodes; } goto i2aJ6; A8Zu_: $this->nodes = $mdHu1; goto Rdv36; i2aJ6: if (is_string($u5cUO) && is_subclass_of($u5cUO, BaseType::class)) { goto u359R; pdRUJ: $RCFtG = 1; goto fIgBY; u359R: $mdHu1 = array(); goto pdRUJ; fIgBY: foreach ($u5cUO::getList() as $Fkd1C => $pk5fc) { $mdHu1[] = array('id' => $Fkd1C, 'pid' => 0, 'title' => $pk5fc, 'sort' => $RCFtG++); } goto rDLI5; rDLI5: } else { if (is_array($u5cUO)) { $mdHu1 = $u5cUO; } else { BizException::throws('Select nodes error'); } } goto A8Zu_; Rdv36: } }