private function clearClipboard(EnvironmentInterface $environment)
    {
        $basicDefinition = $environment->getDataDefinition()->getBasicDefinition();

        $filter = new Filter();
        $filter->andModelIsFromProvider($basicDefinition->getDataProvider());
        if ($basicDefinition->getParentDataProvider()) {
            $filter->andParentIsFromProvider($basicDefinition->getParentDataProvider());
        } else {
            $filter->andHasNoParent();
        }

        $clipboard = $environment->getClipboard();

        $items = $clipboard->fetch($filter);
        if (\count($items) < 1) {
            return;
        }

        foreach ($items as $item) {
            $clipboard->remove($item);
        }
    }