<?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($Tkur1) { $this->addVariables(array('server' => $Tkur1)); return $this; } public function unserializeValue($Mczr_, AbstractField $rZfgs) { if (null === $Mczr_) { return $Mczr_; } return ConvertUtil::toArray($Mczr_); } public function serializeValue($Mczr_, $vn_cr) { return SerializeUtil::jsonEncode($Mczr_); } public function prepareInput($Mczr_, $vn_cr) { goto ez7ry; ez7ry: $Mczr_ = ConvertUtil::toArray($Mczr_); goto dE4xD; dE4xD: if (is_array($Mczr_)) { foreach ($Mczr_ as $B34tD => $Xz28r) { if (DataManager::isDataTemp($Xz28r)) { goto Swxut; LxtnW: if (Response::isError($ZIe4d)) { continue; } goto gp3pN; gp3pN: $Mczr_[$B34tD] = DataManager::fix($ZIe4d['data']['path']); goto fyV1r; Swxut: $ZIe4d = DataManager::storeTempDataByPath($Xz28r); goto LxtnW; fyV1r: } } } goto W_Cro; W_Cro: return $Mczr_; goto sSRbc; sSRbc: } }