<?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($GyeYJ) { $this->addVariables(array('server' => $GyeYJ)); return $this; } public function unserializeValue($wvO30, AbstractField $Lgjfa) { if (null === $wvO30) { return $wvO30; } return ConvertUtil::toArray($wvO30); } public function serializeValue($wvO30, $w5oww) { return json_encode($wvO30); } public function prepareInput($wvO30, $w5oww) { goto Ll_HK; qeKbo: if (is_array($wvO30)) { foreach ($wvO30 as $plrwN => $uTz0e) { if (DataManager::isDataTemp($uTz0e)) { goto EBIAA; kd1po: if (Response::isError($pTwJr)) { continue; } goto sRCPi; sRCPi: $wvO30[$plrwN] = DataManager::fix($pTwJr['data']['path']); goto qIM9e; EBIAA: $pTwJr = DataManager::storeTempDataByPath($uTz0e); goto kd1po; qIM9e: } } } goto LAycg; Ll_HK: $wvO30 = ConvertUtil::toArray($wvO30); goto qeKbo; LAycg: return $wvO30; goto FJKuM; FJKuM: } }