I\'ve set a variable in parameters.ini, but now I want to retrieve that variable from an EntityRepository and $this->container
is unset so I can\'t do it
You can retrieve your variable from the Controller as usual, and pass it to the EntityRepository if you define a custom repository method. For example:
public function findAllOrderedByFoo($your_variable)
{
//use $your_variable here
return $this->getEntityManager()
->createQuery( your SQL here )
->getResult();
}