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

Breadcrumb

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

function CallTrait::call

Adds a method to call after service initialization.

Parameters

string $method The method name to call:

array $arguments An array of arguments to pass to the method call:

bool $returnsClone Whether the call returns the service instance or not:

Return value

$this

Throws

InvalidArgumentException on empty $method param

File

vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php, line 29

Class

CallTrait

Namespace

Symfony\Component\DependencyInjection\Loader\Configurator\Traits

Code

public final function call(string $method, array $arguments = [], bool $returnsClone = false) : static {
    $this->definition
        ->addMethodCall($method, static::processValue($arguments, true), $returnsClone);
    return $this;
}

API Navigation

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