<?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($RlLfN) { $this->addVariables(array('server' => $RlLfN)); return $this; } public function unserializeValue($cBDsM, AbstractField $Ldet7) { if (null === $cBDsM) { return $cBDsM; } return ConvertUtil::toArray($cBDsM); } public function serializeValue($cBDsM, $GMqtO) { return SerializeUtil::jsonEncode($cBDsM); } public function prepareInput($cBDsM, $GMqtO) { goto DYsxy; DYsxy: $cBDsM = ConvertUtil::toArray($cBDsM); goto eMQj0; eMQj0: if (is_array($cBDsM)) { foreach ($cBDsM as $lxIPA => $knQyJ) { if (DataManager::isDataTemp($knQyJ)) { goto OsAyF; OsAyF: $bCCWW = DataManager::storeTempDataByPath($knQyJ); goto vuYwD; z0fKL: $cBDsM[$lxIPA] = DataManager::fix($bCCWW['data']['path']); goto mwvKy; vuYwD: if (Response::isError($bCCWW)) { continue; } goto z0fKL; mwvKy: } } } goto Q70Wu; Q70Wu: return $cBDsM; goto nh7VQ; nh7VQ: } }