<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConvertUtil; use ModStart\Core\Util\SerializeUtil; use ModStart\Data\DataManager; class ImagesTemp extends AbstractField { protected $width = 80; protected static $js = array('asset/common/uploadButton.js'); protected function setup() { $this->addVariables(array('server' => modstart_admin_url('data/file_manager/image'))); } public function server($YSNPl) { $this->addVariables(array('server' => $YSNPl)); return $this; } public function unserializeValue($HDpl6, AbstractField $E8QRJ) { if (null === $HDpl6) { return $HDpl6; } return ConvertUtil::toArray($HDpl6); } public function serializeValue($HDpl6, $xTADA) { return SerializeUtil::jsonEncode($HDpl6); } public function prepareInput($HDpl6, $xTADA) { goto PSN0Q; QaHlW: return $HDpl6; goto gCq3u; aavOK: if (is_array($HDpl6)) { foreach ($HDpl6 as $pztz4 => $Q0rz2) { if (DataManager::isDataTemp($Q0rz2)) { goto zDg0T; Vn2H2: $HDpl6[$pztz4] = DataManager::fix($Z5nZL['data']['path']); goto r17N3; MAurC: if (Response::isError($Z5nZL)) { continue; } goto Vn2H2; zDg0T: $Z5nZL = DataManager::storeTempDataByPath($Q0rz2); goto MAurC; r17N3: } } } goto QaHlW; PSN0Q: $HDpl6 = ConvertUtil::toArray($HDpl6); goto aavOK; gCq3u: } }