protected function applyHook($variantId, $systemHash, $type, $uid)
    {
        if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifyVariantId'])) {
            return $variantId;
        }

        foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifyVariantId'] as $classReference) {
            $variantIdModifier = GeneralUtility::makeInstance($classReference);
            if ($variantIdModifier instanceof IdModifier) {
                $variantId = $variantIdModifier->modifyVariantId($variantId, $systemHash, $type, $uid);
            }
        }

        return $variantId;
    }