Beispiel #1
0
 /**
  * @inheritDoc
  */
 public function radioButton($model, $attribute, $htmlOptions = array())
 {
     if (!$this->qualifyNames && !isset($htmlOptions['name'])) {
         $htmlOptions['name'] = $attribute;
     }
     if (!isset($htmlOptions['itemprop'])) {
         $htmlOptions['itemprop'] = $this->getItemPropName($attribute);
     }
     return parent::radioButton($model, $attribute, $htmlOptions);
 }
Beispiel #2
0
 /**
  * Renders a radio button for a model attribute.
  * @param CModel $parentModel the parent data model
  * @param string $attributedPath the attribute or path to related model attribute
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated radio button
  */
 public function radioButton($parentModel, $attributedPath, $htmlOptions = array())
 {
     list($model, $attribute, $htmlOptions) = self::resolveArgs($parentModel, $attributedPath, $htmlOptions);
     return parent::radioButton($model, $attribute, $htmlOptions);
 }