checkboxList custom class

Hi there,

here is the sample code from Yii2 checkboxList , I want to add custom class for each Item in checkboxList but I dont know how and where can I add that !

could you please help me please …




$list = [0 => 'PHP', 1 => 'MySQL', 2 => 'Javascript'];

$list2 = [0,2];


echo Html::checkboxList('CuisineId',$list2,$list,array('class' => 'test' ));



thanks in advance