You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
Trying to do this in Symfony 3.3 we always get "Attempted to call an undefined method named "get" of class "AppBundle\EventSubscriber\SitemapBlogPostsSubscriber""
The call in question is this: $postManager = $this->get('ekino.wordpress.manager.post');
We tried defining 'ekino.wordpress.manager.post' as an attribute for the service in services.yml, but no luck.
Any suggestions are highly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered:
You will only be able to access services through "$this->get()" if your SitemapBlogPostsSubscriber class inherits from ContainerAwareInterface. Instead of doing that, you could inject serviceekino.wordpress.manager.post into your class.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to do this in Symfony 3.3 we always get "Attempted to call an undefined method named "get" of class "AppBundle\EventSubscriber\SitemapBlogPostsSubscriber""
The call in question is this: $postManager = $this->get('ekino.wordpress.manager.post');
We tried defining 'ekino.wordpress.manager.post' as an attribute for the service in services.yml, but no luck.
Any suggestions are highly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: