if (empty($enabled) || in_array($channel->code, $enabled)) {
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
}
if (empty($enabled) || in_array($channel->code, $enabled)) {
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
}