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