<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; class KeyValueList extends AbstractField { protected $value = array(); 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($FT9zA) { $this->addVariables(array('keyPlaceholder' => $FT9zA)); return $this; } public function valuePlaceholder($FT9zA) { $this->addVariables(array('valuePlaceholder' => $FT9zA)); return $this; } public function keyTitle($FT9zA) { $this->addVariables(array('keyTitle' => $FT9zA)); return $this; } public function valueTitle($FT9zA) { $this->addVariables(array('valueTitle' => $FT9zA)); return $this; } public function keyLabel($Z3ka8) { $this->addVariables(array('keyLabel' => $Z3ka8)); return $this; } public function valueLabel($YLSCg) { $this->addVariables(array('valueLabel' => $YLSCg)); return $this; } public function unserializeValue($FT9zA, AbstractField $SQ6_6) { goto Z0Jcr; TF1d5: return $FT9zA; goto cfEhx; znYn6: if (empty($FT9zA)) { $FT9zA = array(); } goto TF1d5; Z0Jcr: $FT9zA = @json_decode($FT9zA, true); goto znYn6; cfEhx: } public function serializeValue($FT9zA, $TAWWJ) { return json_encode($FT9zA, JSON_UNESCAPED_UNICODE); } public function prepareInput($FT9zA, $TAWWJ) { goto EZWV8; cEIQK: return $FT9zA; goto MvhqX; EZWV8: $FT9zA = @json_decode($FT9zA, true); goto MlZwP; MlZwP: if (empty($FT9zA)) { $FT9zA = array(); } goto cEIQK; MvhqX: } }