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

Breadcrumb

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

function ReStructuredTextDescriptor::describeInputArgument

Overrides Descriptor::describeInputArgument

1 call to ReStructuredTextDescriptor::describeInputArgument()
ReStructuredTextDescriptor::describeInputDefinition in vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php
Describes an InputDefinition instance.

File

vendor/symfony/console/Descriptor/ReStructuredTextDescriptor.php, line 58

Class

ReStructuredTextDescriptor

Namespace

Symfony\Component\Console\Descriptor

Code

protected function describeInputArgument(InputArgument $argument, array $options = []) : void {
    $this->write($argument->getName() ?: '<none>' . "\n" . str_repeat($this->paragraphsChar, Helper::width($argument->getName())) . "\n\n" . ($argument->getDescription() ? preg_replace('/\\s*[\\r\\n]\\s*/', "\n", $argument->getDescription()) . "\n\n" : '') . '- **Is required**: ' . ($argument->isRequired() ? 'yes' : 'no') . "\n" . '- **Is array**: ' . ($argument->isArray() ? 'yes' : 'no') . "\n" . '- **Default**: ``' . str_replace("\n", '', var_export($argument->getDefault(), true)) . '``');
}

API Navigation

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