activeRadioButtonControlGroup() 공개 정적인 메소드

Generates a control group with a radio button for a model attribute.
또한 보기: self::activeControlGroup
public static activeRadioButtonControlGroup ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
리턴 string the generated control group.
예제 #1
0
 public function testActiveRadioButtonControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeRadioButtonControlGroup(new Dummy(), 'radio');
     $group = $I->createNode($html, 'div.control-group');
     $I->seeNodeChildren($group, array('input[type=hidden]', 'label.radio'));
     $label = $group->filter('label.radio');
     $I->seeNodeChildren($label, array('input[type=radio]'));
 }
예제 #2
0
 /**
  * Generates a control group with a radio button for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute name.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated row.
  * @see TbHtml::activeRadioButtonControlGroup
  */
 public function radioButtonControlGroup($model, $attribute, $htmlOptions = array())
 {
     $htmlOptions = $this->processRowOptions($model, $attribute, $htmlOptions);
     return TbHtml::activeRadioButtonControlGroup($model, $attribute, $htmlOptions);
 }