private function checkForAction($clipboard, $action)
    {
        // Make a filter for the given action.
        $filter = new Filter();
        $filter->andActionIs($action);
        $items = $clipboard->fetch($filter);

        // Check if there are items.
        if ($items === null) {
            return;
        }

        /** @var ItemInterface[] $items */
        foreach ($items as $item) {
            // Check the context.
            $itemProviderName = $item->getDataProviderName();
            $modelId          = $item->getModelId();

            if ($this->providerName !== $itemProviderName) {
                continue;
            }

            if (!$modelId) {
                $this->checkEmpty($action);
                continue;
            }

            $containedModel = $this->getModelById($modelId->getId());
            if ($this->currentModel == null) {
                $this->checkForRoot($containedModel, $action);
            } elseif ($containedModel) {
                $this->checkForModel($containedModel, $action);
            } else {
                $this->checkEmpty($action);
            }
        }
    }