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

Breadcrumb

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

function Context::__construct

Same name in this branch
  1. 11.1.x vendor/open-telemetry/api/Instrumentation/AutoInstrumentation/Context.php \OpenTelemetry\API\Instrumentation\AutoInstrumentation\Context::__construct()
  2. 11.1.x vendor/open-telemetry/context/Context.php \OpenTelemetry\Context\Context::__construct()
  3. 11.1.x vendor/sebastian/recursion-context/src/Context.php \SebastianBergmann\RecursionContext\Context::__construct()
  4. 11.1.x vendor/symfony/serializer/Attribute/Context.php \Symfony\Component\Serializer\Attribute\Context::__construct()
  5. 11.1.x vendor/phpdocumentor/type-resolver/src/Types/Context.php \phpDocumentor\Reflection\Types\Context::__construct()
  6. 11.1.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::__construct()

Create a context object.

Parameters

\Drupal\Component\Plugin\Context\ContextDefinitionInterface $context_definition: The context definition.

mixed|null $context_value: The value of the context.

2 calls to Context::__construct()
Context::__construct in core/lib/Drupal/Core/Plugin/Context/Context.php
Create a context object.
Context::__construct in core/lib/Drupal/Core/Plugin/Context/Context.php
Create a context object.
1 method overrides Context::__construct()
Context::__construct in core/lib/Drupal/Core/Plugin/Context/Context.php
Create a context object.

File

core/lib/Drupal/Component/Plugin/Context/Context.php, line 36

Class

Context
A generic context class for wrapping data a plugin needs to operate.

Namespace

Drupal\Component\Plugin\Context

Code

public function __construct(ContextDefinitionInterface $context_definition, $context_value = NULL) {
    $this->contextDefinition = $context_definition;
    $this->contextValue = $context_value;
}

API Navigation

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