<?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($mdHu1, $uFk3K = array()) { goto fxMlx; yLfBy: return $this; goto UeWaf; fxMlx: if ($mdHu1 instanceof \Closure) { $mdHu1 = call_user_func($mdHu1, $this); } else { if (is_array($mdHu1)) { } else { if (null !== $uFk3K && is_array($uFk3K) && empty($uFk3K)) { $uFk3K = TypeUtil::colorGuessMap($mdHu1); } $mdHu1 = $mdHu1::getList(); } } goto VF9Km; VF9Km: $this->addVariables(array('valueMap' => $mdHu1, 'colorMap' => $uFk3K)); goto yLfBy; UeWaf: } public function render() { $this->addCascadeScript(); return parent::render(); } }