Jump to content

Pobranie serwisu w zaczepie actionDispatcher


xPaw

Recommended Posts

Cześć,

Mam problem z pobieraniem danych w zaczepie actionDispatcher

Ma ktoś pomysł w jaki sposób pobrać serwis w tym zaczepie?

public function hookActionDispatcher($params)
{
	$dbPrefix = $this->getContainer()->getParameter('database_prefix'); # return error
	$connection = $this->get('doctrine.dbal.default_connection'); # return false

}

 

Dodam tylko, że ten sam kod tylko wykonywany w innym zaczepie np. displayFooter działa poprawnie.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...