public function moduleQuestion($showProfile = true)
    {
        $modules = $this->extensionManager->discoverModules()
            ->showInstalled()
            ->showUninstalled()
            ->showNoCore()
            ->getList(true);

        if ($showProfile) {
            $profiles = $this->extensionManager->discoverProfiles()
                ->showInstalled()
                ->showUninstalled()
                ->showNoCore()
                ->showCore()
                ->getList(true);

            $modules = array_merge($modules, $profiles);
        }

        if (empty($modules)) {
            throw new \Exception('No extension available, execute the proper generator command to generate one.');
        }

        $module = $this->getIo()->choiceNoList(
            $this->trans('commands.common.questions.module'),
            $modules
        );

        return $module;
    }
public function moduleQuestion($showProfile = true)
    {
        $modules = $this->extensionManager->discoverModules()
            ->showInstalled()
            ->showUninstalled()
            ->showNoCore()
            ->getList(true);

        if ($showProfile) {
            $profiles = $this->extensionManager->discoverProfiles()
                ->showInstalled()
                ->showUninstalled()
                ->showNoCore()
                ->showCore()
                ->getList(true);

            $modules = array_merge($modules, $profiles);
        }

        if (empty($modules)) {
            throw new \Exception('No extension available, execute the proper generator command to generate one.');
        }

        $module = $this->getIo()->choiceNoList(
            $this->trans('commands.common.questions.module'),
            $modules
        );

        return $module;
    }
public function moduleQuestion ( $ showProfile = true ) { $ modules = $ this -> extensionManager -> discoverModules ( ) -> showInstalled ( ) -> showUninstalled ( ) -> showNoCore ( ) -> getList ( true ) ; if ( $ showProfile ) { $ profiles = $ this -> extensionManager -> discoverProfiles ( ) -> showInstalled ( ) -> showUninstalled ( ) -> showNoCore ( ) -> showCore ( ) -> getList ( true ) ; $ modules = array_merge ( $ modules , $ profiles ) ; } if ( empty ( $ modules ) ) { throw new \ Exception ( 'No extension available, execute the proper generator command to generate one.' ) ; } $ module = $ this -> getIo ( ) -> choiceNoList ( $ this -> trans ( 'commands.common.questions.module' ) , $ modules ) ; return $ module ; }
Ask the user to choose a module or profile.

@param bool        $showProfile
If profiles should be discovered.

@throws \Exception
When no modules are found.

@return string
Ask the user to choose a module or profile .