TbHtml::activeInlineCheckBoxList PHP Method

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.
    public static function activeInlineCheckBoxList($model, $attribute, $data, $htmlOptions = array())
    {
        $htmlOptions['inline'] = true;
        return self::activeCheckBoxList($model, $attribute, $data, $htmlOptions);
    }

Usage Example

 /**
  * 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);
 }
All Usage Examples Of TbHtml::activeInlineCheckBoxList
TbHtml