<?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($HDpl6) { $this->addVariables(array('vertical' => $HDpl6)); return $this; } public function optionValues($c6Fiz) { $c6Fiz = array_build($c6Fiz, function ($VFU9l, $HDpl6) { return array($HDpl6, $HDpl6); }); return $this->options($c6Fiz); } public function options($Bodfy) { $this->addVariables(array('options' => $Bodfy)); return $this; } public function optionType($ottBC) { return $this->options($ottBC::getList()); } public function optionModel($wyCKK, $lwKEo = 'id', $vrWwY = 'name') { return $this->options(ModelUtil::valueMap($wyCKK, $lwKEo, $vrWwY)); } public function render() { $this->addCascadeScript(); return parent::render(); } }