<?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($xyEtj) { $this->addVariables(array('server' => $xyEtj)); return $this; } public function mode($oWpPb) { $this->addVariables(array('mode' => $oWpPb)); 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) { return ConvertUtil::toArray($ib3B9); } }