/** * Creates a new menu item from a simple name. The name is normalized and * translated with the specified translation domain. * * @param AdminInterface $admin used for translation * @param ItemInterface $menu will be modified and returned * @param string $name the source of the final label * @param string $translationDomain for label translation * @param array $options menu item options * * @return ItemInterface */ private function createMenuItem(AdminInterface $admin, ItemInterface $menu, $name, $translationDomain = null, $options = array()) { return $menu->addChild($admin->trans($admin->getLabelTranslatorStrategy()->getLabel($name, 'breadcrumb', 'link'), array(), $translationDomain), $options); }