public static function callHookAndSignal($class, $name, $obj, &$args = null)
    {
        static $hookConf = null;
        static $signalSlotDispatcher = null;

        // Fetch hooks config for metaseo, minimize array lookups
        if ($hookConf === null) {
            $hookConf = array();
            if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['metaseo']['hooks'])
                && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['metaseo']['hooks'])
            ) {
                $hookConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['metaseo']['hooks'];
            }
        }

        // Call hooks
        if (!empty($hookConf[$name]) && is_array($hookConf[$name])) {
            foreach ($hookConf[$name] as $_funcRef) {
                if ($_funcRef) {
                    Typo3GeneralUtility::callUserFunction($_funcRef, $args, $obj);
                }
            }
        }

        // Call signal
        if ($signalSlotDispatcher === null) {
            /** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
            $objectManager = Typo3GeneralUtility::makeInstance(
                'TYPO3\\CMS\\Extbase\\Object\\ObjectManager'
            );

            /** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
            $signalSlotDispatcher = $objectManager->get('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
        }
        list($args) = $signalSlotDispatcher->dispatch($class, $name, array($args, $obj));
    }