<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConvertUtil; 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($J1_hF) { $this->addVariables(array('server' => $J1_hF)); return $this; } public function unserializeValue($gwXrh, AbstractField $VWt5t) { if (null === $gwXrh) { return $gwXrh; } return ConvertUtil::toArray($gwXrh); } public function serializeValue($gwXrh, $uV19D) { return json_encode($gwXrh); } public function prepareInput($gwXrh, $uV19D) { goto rRZnl; BwoKp: if (is_array($gwXrh)) { foreach ($gwXrh as $GBNIv => $VFelt) { if (DataManager::isDataTemp($VFelt)) { goto CQBuC; nZ723: $gwXrh[$GBNIv] = DataManager::fix($UdQ1p['data']['path']); goto AT6q1; CQBuC: $UdQ1p = DataManager::storeTempDataByPath($VFelt); goto I8PE6; I8PE6: if (Response::isError($UdQ1p)) { continue; } goto nZ723; AT6q1: } } } goto xXn6o; xXn6o: return $gwXrh; goto i7GDH; rRZnl: $gwXrh = ConvertUtil::toArray($gwXrh); goto BwoKp; i7GDH: } }