<?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($xyEtj) { $this->addVariables(array('server' => $xyEtj)); return $this; } public function unserializeValue($ib3B9, AbstractField $pu1ro) { if (null === $ib3B9) { return $ib3B9; } return ConvertUtil::toArray($ib3B9); } public function serializeValue($ib3B9, $nzuw7) { return json_encode($ib3B9); } public function prepareInput($ib3B9, $nzuw7) { goto orpYu; orpYu: $ib3B9 = ConvertUtil::toArray($ib3B9); goto sQrNn; sQrNn: if (is_array($ib3B9)) { foreach ($ib3B9 as $F_a6B => $JiRHR) { if (DataManager::isDataTemp($JiRHR)) { goto Iyi8Q; T0Js1: if (Response::isError($gbVzz)) { continue; } goto rCEnX; rCEnX: $ib3B9[$F_a6B] = DataManager::fix($gbVzz['data']['path']); goto SGLnu; Iyi8Q: $gbVzz = DataManager::storeTempDataByPath($JiRHR); goto T0Js1; SGLnu: } } } goto kpQ7d; kpQ7d: return $ib3B9; goto eJil0; eJil0: } }