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

Breadcrumb

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

function ArgumentTrait::arg

Sets one argument to pass to the service constructor/factory method.

Return value

$this

File

vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php, line 33

Class

ArgumentTrait

Namespace

Symfony\Component\DependencyInjection\Loader\Configurator\Traits

Code

public final function arg(string|int $key, mixed $value) : static {
    $this->definition
        ->setArgument($key, static::processValue($value, true));
    return $this;
}

API Navigation

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