<?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($bs3PA = null) { goto gJYFW; sicDr: if (is_string($bs3PA) && is_subclass_of($bs3PA, BaseType::class)) { goto EGPrH; nwysB: $M_P_6 = 1; goto zyp2t; EGPrH: $Gttsd = array(); goto nwysB; zyp2t: foreach ($bs3PA::getList() as $RTHJ6 => $F6Fus) { $Gttsd[] = array('id' => $RTHJ6, 'pid' => 0, 'title' => $F6Fus, 'sort' => $M_P_6++); } goto Dv3N5; Dv3N5: } else { if (is_array($bs3PA)) { $Gttsd = $bs3PA; } else { BizException::throws('Select nodes error'); } } goto spEau; gJYFW: if (null === $bs3PA) { return $this->nodes; } goto sicDr; spEau: $this->nodes = $Gttsd; goto X26tk; X26tk: } }