<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\ConvertUtil; use ModStart\Field\Type\FieldRenderMode; class Checkbox extends AbstractField { protected $value = array(); protected function setup() { $this->addVariables(array('options' => array())); } public function options($H02oa) { $this->addVariables(array('options' => $H02oa)); return $this; } public function optionModel($I1hTb, $kkQsP = 'id', $Zmb65 = 'name') { return $this->options(ModelUtil::valueMap($I1hTb, $kkQsP, $Zmb65)); } public function optionType($mlDa5) { return $this->options($mlDa5::getList()); } public function unserializeValue($tzAUI, AbstractField $Q2vn5) { return ConvertUtil::toArray($tzAUI); } public function serializeValue($tzAUI, $pWRTh) { return json_encode($tzAUI); } public function prepareInput($tzAUI, $pWRTh) { return ConvertUtil::toArray($tzAUI); } }