<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; class KeyValueList extends AbstractField { protected $width = 300; protected $listable = false; protected function setup() { $this->addVariables(array('keyTitle' => L('Key'), 'valueTitle' => L('Value'), 'keyPlaceholder' => L('Please Input'), 'valuePlaceholder' => L('Please Input'), 'keyLabel' => 'k', 'valueLabel' => 'v')); } public function keyPlaceholder($wvO30) { $this->addVariables(array('keyPlaceholder' => $wvO30)); return $this; } public function valuePlaceholder($wvO30) { $this->addVariables(array('valuePlaceholder' => $wvO30)); return $this; } public function keyTitle($wvO30) { $this->addVariables(array('keyTitle' => $wvO30)); return $this; } public function valueTitle($wvO30) { $this->addVariables(array('valueTitle' => $wvO30)); return $this; } public function keyLabel($NnwNo) { $this->addVariables(array('keyLabel' => $NnwNo)); return $this; } public function valueLabel($p4GlU) { $this->addVariables(array('valueLabel' => $p4GlU)); return $this; } public function unserializeValue($wvO30, AbstractField $Lgjfa) { goto nAWSt; nAWSt: if (null === $wvO30) { return $wvO30; } goto JSEqv; Z6VQ0: return $wvO30; goto cqMA2; FeWJc: if (empty($wvO30)) { $wvO30 = array(); } goto Z6VQ0; JSEqv: $wvO30 = @json_decode($wvO30, true); goto FeWJc; cqMA2: } public function serializeValue($wvO30, $w5oww) { return json_encode($wvO30, JSON_UNESCAPED_UNICODE); } public function prepareInput($wvO30, $w5oww) { goto Ll4iY; Ll4iY: $wvO30 = @json_decode($wvO30, true); goto UFXw2; UFXw2: if (empty($wvO30)) { $wvO30 = array(); } goto n3jDS; n3jDS: return $wvO30; goto S9T0x; S9T0x: } }