<?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 function setup() { $this->addVariables(array('vertical' => false, 'options' => array())); } public function vertical($Mczr_) { $this->addVariables(array('vertical' => $Mczr_)); return $this; } public function optionValues($rTniN) { $rTniN = array_build($rTniN, function ($l6tBV, $Mczr_) { return array($Mczr_, $Mczr_); }); return $this->options($rTniN); } public function options($RKwZR) { $this->addVariables(array('options' => $RKwZR)); return $this; } public function optionType($qeBS4) { return $this->options($qeBS4::getList()); } public function optionModel($AD05J, $eAE99 = 'id', $Qduwq = 'name') { return $this->options(ModelUtil::valueMap($AD05J, $eAE99, $Qduwq)); } public function render() { $this->addCascadeScript(); return parent::render(); } }