public function manipulateWizardItems(&$wizardItems, &$parentObject)
    {
        if (!$this->getBackendUser()->checkAuthMode(
            'tt_content',
            'CType',
            'gridelements_pi1',
            $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode']
        )) {
            return;
        }
        $pageID = $parentObject->id;
        $this->init($pageID);

        $container = (int)GeneralUtility::_GP('tx_gridelements_container');
        $column = (int)GeneralUtility::_GP('tx_gridelements_columns');
        $allowed_GP = GeneralUtility::_GP('tx_gridelements_allowed');
        $disallowed_GP = GeneralUtility::_GP('tx_gridelements_disallowed');
        if (!empty($allowed_GP) || !empty($disallowed_GP)) {
            $allowed = json_decode(base64_decode($allowed_GP), true) ?: [];
            if (!empty($allowed)) {
                foreach ($allowed as &$item) {
                    if (!is_array($item)) {
                        $item = array_flip(GeneralUtility::trimExplode(',', $item));
                    }
                }
            }
            $disallowed = json_decode(base64_decode($disallowed_GP), true) ?: [];
            if (!empty($disallowed)) {
                foreach ($disallowed as &$item) {
                    if (!is_array($item)) {
                        $item = array_flip(GeneralUtility::trimExplode(',', $item));
                    }
                }
            }
            $this->removeDisallowedWizardItems($allowed, $disallowed, $wizardItems);
        } else {
            $allowed = null;
            $disallowed = null;
        }
        if ((
                empty($allowed['CType']) ||
                isset($allowed['CType']['gridelements_pi1']) ||
                isset($allowed['CType']['*'])
            ) &&
            !isset($disallowed['tx_gridelements_backend_layout']['*'])
        ) {
            $allowedGridTypes = $allowed['tx_gridelements_backend_layout'] ?: [];
            $disallowedGridTypes = $disallowed['tx_gridelements_backend_layout'] ?: [];
            $excludeLayouts = $this->getExcludeLayouts($container, $parentObject);

            $gridItems = $this->layoutSetup->getLayoutWizardItems(
                $parentObject->colPos,
                $excludeLayouts,
                $allowedGridTypes,
                $disallowedGridTypes
            );
            $this->addGridItemsToWizard($gridItems, $wizardItems);
        }

        $this->addGridValuesToWizardItems($wizardItems, $container, $column);

        $this->removeEmptyHeadersFromWizard($wizardItems);
    }