'test')); $customizablesEntities = static::$kernel->getContainer() ->getParameter('chill_custom_fields.customizables_entities'); $reportFounded = false; foreach ($customizablesEntities as $customizablesEntity) { if($customizablesEntity['class'] === 'Chill\ReportBundle\Entity\Report') { $reportFounded = true; } } if(! $reportFounded) { throw new Exception("Class Chill\ReportBundle\Entity\Report not found in chill_custom_fields.customizables_entities", 1); } } }