activeInlineCheckBoxList() public static method

Generates an inline check box list for a model attribute.
public static activeInlineCheckBoxList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$data array $data value-label pairs used to generate the check box list.
$htmlOptions array additional HTML attributes.
return string the generated list.
 /**
  * Renders an inline checkbox list for a model attribute.
  * @param CModel $model the data model.
  * @param string $attribute the attribute.
  * @param array $data data for generating the list options (value=>display)
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated checkbox list.
  * @see TbHtml::activeInlineCheckBoxList
  */
 public function inlineCheckBoxList($model, $attribute, $data, $htmlOptions = array())
 {
     return TbHtml::activeInlineCheckBoxList($model, $attribute, $data, $htmlOptions);
 }
示例#2
0
 public function testActiveInlineCheckBoxList()
 {
     $I = $this->codeGuy;
     $html = TbHtml::activeInlineCheckBoxList(new Dummy(), 'checkboxList', array('Option 1', 'Option 2', 'Option 3'));
     $container = $I->createNode($html);
     $I->seeNodeChildren($container, array('label.checkbox.inline', 'label.checkbox.inline', 'label.checkbox.inline'));
 }
示例#3
0
 /**
  * Renders and inline checkbox list.
  * Please check {@link TbHtml::activeInlieCheckBoxList} for detailed information
  * @param $model
  * @param $attribute
  * @param $data
  * @param array $htmlOptions
  * @return string
  */
 public function inlineCheckBoxList($model, $attribute, $data, $htmlOptions = array())
 {
     return $this->wrapControl(TbHtml::activeInlineCheckBoxList($model, $attribute, $data, $htmlOptions));
 }