public function presetVariantBase(PreEditModelEvent $event)
{
$model = $event->getModel();
// Check of we have the driver from MetaModels. Only these request are from interest.
if (!$model instanceof Model) {
return;
}
// Get the item and check the context.
$nativeItem = $model->getItem();
$metaModel = $nativeItem->getMetaModel();
if ($metaModel->hasVariants() && !$nativeItem->get('vargroup')) {
$nativeItem->set('varbase', '1');
}
}