<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\ConvertUtil; use ModStart\Field\Concern\CanCascadeFields; use ModStart\Field\Type\FieldRenderMode; class Radio extends AbstractField { use CanCascadeFields; protected $value = array(); protected function setup() { $this->addVariables(array('options' => array())); } public function options($X3Hkn) { $this->addVariables(array('options' => $X3Hkn)); return $this; } public function optionType($ac3f3) { return $this->options($ac3f3::getList()); } public function optionModel($zWXdn, $ZL1Sk = 'id', $sOJld = 'name') { return $this->options(ModelUtil::valueMap($zWXdn, $ZL1Sk, $sOJld)); } public function render() { $this->addCascadeScript(); return parent::render(); } }