can yii2 store an array in postgres' integer[] type field?

Good day

I have two doubts

Can yii2 store an array in postgres’ integer[] type field?

and if possible

How can i do it?

Absolutely, just make certain that in your rules, you don’t have integar validation enabled for this field.

Model:
public function getCheckboxOptions()
{
  return [
    1 => 'Option 1',
    2 => 'Option 2,
  ];
}

View:
<?= $form->field($model, 'my_checkbox')->checkboxList($model->checkboxOptions) ?>