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

Breadcrumb

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

function ContextInterface::createFromContext

Creates a new context with a different value.

Parameters

\Drupal\Core\Plugin\Context\ContextInterface $old_context: The context object used to create a new object. Cacheability metadata will be copied over.

mixed $value: The value of the new context object.

Return value

static

1 method overrides ContextInterface::createFromContext()
Context::createFromContext in core/lib/Drupal/Core/Plugin/Context/Context.php
Creates a new context with a different value.

File

core/lib/Drupal/Core/Plugin/Context/ContextInterface.php, line 59

Class

ContextInterface
Context data and definitions for plugins supporting caching and return docs.

Namespace

Drupal\Core\Plugin\Context

Code

public static function createFromContext(ContextInterface $old_context, $value);

API Navigation

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