<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; class ComplexFields extends AbstractField { protected $width = 300; protected $listable = false; protected function setup() { $this->addVariables(array('fields' => array(), 'iconServer' => modstart_admin_url('widget/icon'))); } private function getDefaultValues() { goto MLUO6; K2FRP: $UZN94 = array(); goto auynl; i98xb: return $UZN94; goto U6_WE; auynl: foreach ($cclNa as $gyP3E) { $UZN94[$gyP3E['name']] = isset($gyP3E['defaultValue']) ? $gyP3E['defaultValue'] : null; } goto i98xb; MLUO6: $cclNa = $this->getVariable('fields'); goto K2FRP; U6_WE: } public function iconServer($GyeYJ) { $this->addVariables(array('iconServer' => $GyeYJ)); return $this; } public function fields($wvO30) { goto toEq1; toEq1: $this->addVariables(array('fields' => $wvO30)); goto xnBak; CKBcE: return $this; goto BExug; xnBak: $this->defaultValue($this->getDefaultValues()); goto CKBcE; BExug: } public function unserializeValue($wvO30, AbstractField $Lgjfa) { goto F9bNE; t9ZAh: $wvO30 = @json_decode($wvO30, true); goto q8MhN; G9BqA: return $wvO30; goto lBGM7; q8MhN: if (empty($wvO30)) { $wvO30 = new \stdClass(); } goto G9BqA; F9bNE: if (null === $wvO30) { return $wvO30; } goto t9ZAh; lBGM7: } public function serializeValue($wvO30, $w5oww) { return json_encode($wvO30, JSON_UNESCAPED_UNICODE); } public function prepareInput($wvO30, $w5oww) { goto z36cW; z36cW: $wvO30 = @json_decode($wvO30, true); goto zOOBg; zOOBg: if (empty($wvO30)) { $wvO30 = new \stdClass(); } goto LLbry; LLbry: return $wvO30; goto dl3qU; dl3qU: } }