<?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($foy7G = null) { goto tCfq6; z599l: if (is_string($foy7G) && is_subclass_of($foy7G, BaseType::class)) { goto X3SnN; X3SnN: $cBDsM = array(); goto i4ecC; i4ecC: $JaLj5 = 1; goto GezxB; GezxB: foreach ($foy7G::getList() as $lxIPA => $knQyJ) { $cBDsM[] = array('id' => $lxIPA, 'pid' => 0, 'title' => $knQyJ, 'sort' => $JaLj5++); } goto lsYdj; lsYdj: } else { if (is_array($foy7G)) { $cBDsM = $foy7G; } else { BizException::throws('Select nodes error'); } } goto o5NzW; o5NzW: $this->nodes = $cBDsM; goto I8hBe; tCfq6: if (null === $foy7G) { return $this->nodes; } goto z599l; I8hBe: } }