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