confirm( $this->trans('commands.generate.form.questions.menu_link_gen'), true ) ) { // now we need to ask them where to gen the form // get the route $menu_options = [ 'menu_link_gen' => true, ]; $menu_link_title = $io->ask( $menu_link_title = $this->trans('commands.generate.form.questions.menu_link_title'), $className ); $menuLinkFile = sprintf( '%s/core/modules/system/system.links.menu.yml', $this->appRoot ); $parser = new Parser(); $menuLinkContent = $parser->parse(file_get_contents($menuLinkFile)); $menu_parent = $io->choiceNoList( $menu_parent = $this->trans('commands.generate.form.questions.menu_parent'), array_keys($menuLinkContent), 'system.admin_config_system' ); $menu_link_desc = $io->ask( $menu_link_desc = $this->trans('commands.generate.form.questions.menu_link_desc'), 'A description for the menu entry' ); $menu_options['menu_link_title'] = $menu_link_title; $menu_options['menu_parent'] = $menu_parent; $menu_options['menu_link_desc'] = $menu_link_desc; return $menu_options; } } }