<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Util\ConvertUtil; class Files extends AbstractField { const MODE_DEFAULT = 'default'; const MODE_RAW = 'raw'; protected $width = 80; protected function setup() { $this->addVariables(array('mode' => self::MODE_DEFAULT, 'server' => modstart_admin_url('data/file_manager/file'))); } public function server($GyeYJ) { $this->addVariables(array('server' => $GyeYJ)); return $this; } public function mode($DtzzY) { $this->addVariables(array('mode' => $DtzzY)); return $this; } public function unserializeValue($wvO30, AbstractField $Lgjfa) { if (null === $wvO30) { return $wvO30; } return ConvertUtil::toArray($wvO30); } public function serializeValue($wvO30, $w5oww) { return json_encode($wvO30); } public function prepareInput($wvO30, $w5oww) { return ConvertUtil::toArray($wvO30); } }