<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Util\ConvertUtil; use ModStart\Core\Util\SerializeUtil; 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($Tkur1) { $this->addVariables(array('server' => $Tkur1)); return $this; } public function mode($qAUbs) { $this->addVariables(array('mode' => $qAUbs)); 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) { return ConvertUtil::toArray($Mczr_); } }