<?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($ib3B9) { $this->addVariables(array('vertical' => $ib3B9)); return $this; } public function optionValues($bP0d3) { $bP0d3 = array_build($bP0d3, function ($GUcFO, $ib3B9) { return array($ib3B9, $ib3B9); }); return $this->options($bP0d3); } public function options($atZJ8) { $this->addVariables(array('options' => $atZJ8)); return $this; } public function optionType($lIzQw) { return $this->options($lIzQw::getList()); } public function optionModel($Y2RbY, $MQulf = 'id', $nbb6p = 'name') { return $this->options(ModelUtil::valueMap($Y2RbY, $MQulf, $nbb6p)); } public function render() { $this->addCascadeScript(); return parent::render(); } }