src/DcGeneral/Events/MetaModel/DuplicateModel.php
public function handle(PreDuplicateModelEvent $event)
    {
        $model = $event->getModel();

        $metaModel = $this->factory->getMetaModel($model->getProviderName());

        if (!$metaModel || !$metaModel->hasVariants()) {
            return;
        }

        // If we have a varbase, reset the vargroup because we got a new id.
        if ($model->getProperty('varbase') == 1) {
            $model->setProperty('vargroup', null);
        }
    }
public function handle(PreDuplicateModelEvent $event)
    {
        $model = $event->getModel();

        $metaModel = $this->factory->getMetaModel($model->getProviderName());

        if (!$metaModel || !$metaModel->hasVariants()) {
            return;
        }

        // If we have a varbase, reset the vargroup because we got a new id.
        if ($model->getProperty('varbase') == 1) {
            $model->setProperty('vargroup', null);
        }
    }
Handle the paste into and after event.

@param PreDuplicateModelEvent $event The event.

@return void