Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Command.php

function Command::getNativeDefinition

Gets the InputDefinition to be used to create representations of this Command.

Can be overridden to provide the original command representation when it would otherwise be changed by merging with the application InputDefinition.

This method is not part of public API and should not be used directly.

1 call to Command::getNativeDefinition()
Command::getDefinition in vendor/symfony/console/Command/Command.php
Gets the InputDefinition attached to this Command.
2 methods override Command::getNativeDefinition()
LazyCommand::getNativeDefinition in vendor/symfony/console/Command/LazyCommand.php
Gets the InputDefinition to be used to create representations of this Command.
TraceableCommand::getNativeDefinition in vendor/symfony/console/Command/TraceableCommand.php
Gets the InputDefinition to be used to create representations of this Command.

File

vendor/symfony/console/Command/Command.php, line 396

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function getNativeDefinition() : InputDefinition {
    return $this->definition ?? throw new LogicException(\sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal