<?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($gwXrh, $o1gXS = array()) { goto xrRjt; ykV_2: return $this; goto mst3O; xrRjt: if ($gwXrh instanceof \Closure) { $gwXrh = call_user_func($gwXrh, $this); } else { if (is_array($gwXrh)) { } else { if (null !== $o1gXS && is_array($o1gXS) && empty($o1gXS)) { $o1gXS = TypeUtil::colorGuessMap($gwXrh); } $gwXrh = $gwXrh::getList(); } } goto fjYNg; fjYNg: $this->addVariables(array('valueMap' => $gwXrh, 'colorMap' => $o1gXS)); goto ykV_2; mst3O: } public function render() { $this->addCascadeScript(); return parent::render(); } }