<?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($aA0oj) { $this->addVariables(array('server' => $aA0oj)); return $this; } public function unserializeValue($tzAUI, AbstractField $Q2vn5) { return ConvertUtil::toArray($tzAUI); } public function serializeValue($tzAUI, $pWRTh) { return json_encode($tzAUI); } public function prepareInput($tzAUI, $pWRTh) { goto v4Zwz; BJha1: return $tzAUI; goto DlfMp; r0WxL: if (is_array($tzAUI)) { foreach ($tzAUI as $U9AsU => $ohYVl) { if (DataManager::isDataTemp($ohYVl)) { goto jmqUl; jmqUl: $uotzZ = DataManager::storeTempDataByPath($ohYVl); goto fuIKQ; y88Y0: $tzAUI[$U9AsU] = DataManager::fix($uotzZ['data']['path']); goto rgaTp; fuIKQ: if (Response::isError($uotzZ)) { continue; } goto y88Y0; rgaTp: } } } goto BJha1; v4Zwz: $tzAUI = ConvertUtil::toArray($tzAUI); goto r0WxL; DlfMp: } }