<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use Illuminate\Support\Str; use ModStart\Core\Type\TypeUtil; use ModStart\Core\Util\ConstantUtil; use ModStart\Field\Concern\CanCascadeFields; class Type extends AbstractField { use CanCascadeFields; protected function setup() { $this->addVariables(array('valueMap' => null, 'colorMap' => array())); } public function type($cBDsM, $ECbHz = array()) { goto ekrT3; qytLi: $this->addVariables(array('valueMap' => $cBDsM, 'colorMap' => $ECbHz)); goto ZYffd; ZYffd: return $this; goto Qltmb; ekrT3: if ($cBDsM instanceof \Closure) { $cBDsM = call_user_func($cBDsM, $this); } else { if (is_array($cBDsM)) { } else { if (null !== $ECbHz && is_array($ECbHz) && empty($ECbHz)) { $ECbHz = TypeUtil::colorGuessMap($cBDsM); } $cBDsM = $cBDsM::getList(); } } goto qytLi; Qltmb: } public function render() { $this->addCascadeScript(); return parent::render(); } }