I'm creating the following form element:
$notify = new Check('notify', [
'value' => (int)$user->AccountsSettings->product_notify,
'class' => 'form-control',
]));
if((bool)$user->AccountsSettings->product_notify)
array_merge($notify->getAttributes(), array('checked' => ''));
But array_merge seems not working.
What I'm missing?? Or there is more simpler solution??
Thanks!