Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Hooks via ObjectManager #49

Open
sventendo opened this issue Feb 26, 2017 · 0 comments
Open

Get Hooks via ObjectManager #49

sventendo opened this issue Feb 26, 2017 · 0 comments

Comments

@sventendo
Copy link

It would be nice to have Dependency Injection for the hook objects called in \Cobweb\Linkhandler\TypolinkHandler::generateLink

        // Call registered hooks
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkhandler']['generateLink'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkhandler']['generateLink'] as $className) {
                $linkParameterProcessor = GeneralUtility::makeInstance($className);
                if ($linkParameterProcessor instanceof ProcessLinkParametersInterface) {
                    $linkParameterProcessor->process($this);
                }
            }
        }

So maybe we could use the ObjectManager to get the hook objects?

I'd be glad to make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant