<?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($P6Nu0) { $this->addVariables(array('server' => $P6Nu0)); return $this; } public function unserializeValue($Gttsd, AbstractField $acdQI) { if (null === $Gttsd) { return $Gttsd; } return ConvertUtil::toArray($Gttsd); } public function serializeValue($Gttsd, $BWo2e) { return json_encode($Gttsd); } public function prepareInput($Gttsd, $BWo2e) { goto UaM8t; NhQwq: if (is_array($Gttsd)) { foreach ($Gttsd as $RTHJ6 => $F6Fus) { if (DataManager::isDataTemp($F6Fus)) { goto HO3SC; SIKUo: $Gttsd[$RTHJ6] = DataManager::fix($f3Nqc['data']['path']); goto sHl1o; QiCRe: if (Response::isError($f3Nqc)) { continue; } goto SIKUo; HO3SC: $f3Nqc = DataManager::storeTempDataByPath($F6Fus); goto QiCRe; sHl1o: } } } goto B1frh; UaM8t: $Gttsd = ConvertUtil::toArray($Gttsd); goto NhQwq; B1frh: return $Gttsd; goto FHLjS; FHLjS: } }