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

find a way to trigger the event listener adder #8

Open
ElectricMaxxx opened this issue May 29, 2014 · 0 comments
Open

find a way to trigger the event listener adder #8

ElectricMaxxx opened this issue May 29, 2014 · 0 comments

Comments

@ElectricMaxxx
Copy link
Owner

The ObjectAdapterManager got own event listeners/subscribers that works very well.
By calling objectAdapterManager->addListenersToEventManagers() they should be added to the event managers the different object managers provides.

I tried to do the following in the bundles extension class, when creating the service definition:

        $container
            ->setDefinition(
                $adapterManager['service_name'],
                new DefinitionDecorator('doctrine_orm_phpcr_adapter.adapter_manager.abstract')
            )
            ->setArguments(array(
                new Reference($abstractManagerServiceId),
                new Reference($abstractEventManagerServiceId)
            ))
            ->addMethodCall('addListenersToEventManagers') 
        ;

(that method call should triggered by some configuration #7)

Thought that can work but does not. I bridged that problem by calling the service from container and calling manually before persisting stuff, but that can't be the right way.

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