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

Breadcrumb

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

function HelperSet::get

Gets a helper value.

Throws

InvalidArgumentException if the helper is not defined

File

vendor/symfony/console/Helper/HelperSet.php, line 61

Class

HelperSet
HelperSet represents a set of helpers to be used with a command.

Namespace

Symfony\Component\Console\Helper

Code

public function get(string $name) : HelperInterface {
    if (!$this->has($name)) {
        throw new InvalidArgumentException(\sprintf('The helper "%s" is not defined.', $name));
    }
    return $this->helpers[$name];
}
RSS feed
Powered by Drupal