<?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($xbtey = null) { goto lZtkf; UTBHB: $this->nodes = $ib3B9; goto X7Zn5; lZtkf: if (null === $xbtey) { return $this->nodes; } goto sl7W9; sl7W9: if (is_string($xbtey) && is_subclass_of($xbtey, BaseType::class)) { goto Ch3mH; Ch3mH: $ib3B9 = array(); goto ukeQQ; ukeQQ: $x3b6n = 1; goto j_qK_; j_qK_: foreach ($xbtey::getList() as $F_a6B => $JiRHR) { $ib3B9[] = array('id' => $F_a6B, 'pid' => 0, 'title' => $JiRHR, 'sort' => $x3b6n++); } goto zC1ZT; zC1ZT: } else { if (is_array($xbtey)) { $ib3B9 = $xbtey; } else { BizException::throws('Select nodes error'); } } goto UTBHB; X7Zn5: } }