HomeDocumentationContributorsArticlesChangelogSupport
DrupalConsole siteDrupalConsole site
HomeDocumentationContributorsArticlesChangelogSupport
  • Welcome
  • What is the Drupal Console?
    Why should you care about?How does Drupal Console help?Where do I find the project?
  • Getting the project
    Using ComposerGlobal executable aka LauncherInstalling on Windows
  • Using the project
    How to copy configuration filesHow to download, install and serve Drupal 8How to use Drupal Console in a multi-site installation
  • Available commands
  • Using site alias
    Setting up your local machineHow to use Drupal Console in a remote installationConnecting to a virtual environment
  • What is a chain command
    Registering chain commands as regular commandsListing registered commands
  • Creating custom Commands
    The Command ClassRegistering CommandsConfiguring the CommandCommand LifecycleGetting Services from the Service ContainerGenerating Code with a Command
  • Contributing new features
    Project requirementsGetting the projectRunning the projectKeeping your fork up to dateCreating issues and pull requestsContribute to this documentation
  • FAQ (Frequently Asked Questions) about Drupal Console
    Installation problemsPermissionsCommands not listedInteractive Mode
  • References
Català (ca)English (en)Español (es)فارسی (fa-ir)Français (fr)हिन्दी (hi)Magyar (hu)日本語 (ja)मराठी (mr)Português brasileiro (pt-br)Romanian (ro)pусский язык (ru)Vietnamese (vn)简体中文 (zh-hans)
  • Welcome
  • What is the Drupal Console?
    Why should you care about?How does Drupal Console help?Where do I find the project?
  • Getting the project
    Using ComposerGlobal executable aka LauncherInstalling on Windows
  • Using the project
    How to copy configuration filesHow to download, install and serve Drupal 8How to use Drupal Console in a multi-site installation
  • Available commands
  • Using site alias
    Setting up your local machineHow to use Drupal Console in a remote installationConnecting to a virtual environment
  • What is a chain command
    Registering chain commands as regular commandsListing registered commands
  • Creating custom Commands
    The Command ClassRegistering CommandsConfiguring the CommandCommand LifecycleGetting Services from the Service ContainerGenerating Code with a Command
  • Contributing new features
    Project requirementsGetting the projectRunning the projectKeeping your fork up to dateCreating issues and pull requestsContribute to this documentation
  • FAQ (Frequently Asked Questions) about Drupal Console
    Installation problemsPermissionsCommands not listedInteractive Mode
  • References

Configuring the command.

You must provide aconfigure method containing the configuration of the command as name, arguments, options, etc.

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this
            ->setName('user:login:url')
            ->setDescription($this->trans('commands.user.login.url.description'))
            ->addArgument(
                'uid',
                InputArgument::REQUIRED,
                $this->trans('commands.user.login.url.options.uid'),
                null
            );
    }
HomeDocumentationContributorsArticlesChangelogSupport
© 2020, Built using GatsbyJS