<?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($ib3B9) { $this->addVariables(array('keyPlaceholder' => $ib3B9)); return $this; } public function valuePlaceholder($ib3B9) { $this->addVariables(array('valuePlaceholder' => $ib3B9)); return $this; } public function keyTitle($ib3B9) { $this->addVariables(array('keyTitle' => $ib3B9)); return $this; } public function valueTitle($ib3B9) { $this->addVariables(array('valueTitle' => $ib3B9)); return $this; } public function keyLabel($Yw9zw) { $this->addVariables(array('keyLabel' => $Yw9zw)); return $this; } public function valueLabel($NmcH_) { $this->addVariables(array('valueLabel' => $NmcH_)); return $this; } public function unserializeValue($ib3B9, AbstractField $pu1ro) { goto NL5np; tMMon: return $ib3B9; goto oQNDG; ByPNq: if (empty($ib3B9)) { $ib3B9 = array(); } goto tMMon; NL5np: if (null === $ib3B9) { return $ib3B9; } goto z2G0b; z2G0b: $ib3B9 = @json_decode($ib3B9, true); goto ByPNq; oQNDG: } public function serializeValue($ib3B9, $nzuw7) { return json_encode($ib3B9, JSON_UNESCAPED_UNICODE); } public function prepareInput($ib3B9, $nzuw7) { goto MGHgt; MGHgt: $ib3B9 = @json_decode($ib3B9, true); goto HTIi1; HTIi1: if (empty($ib3B9)) { $ib3B9 = array(); } goto EErdr; EErdr: return $ib3B9; goto se0Nv; se0Nv: } }