You are here

public static function ContextInterface::createFromContext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/Context/ContextInterface.php \Drupal\Core\Plugin\Context\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 61
Contains \Drupal\Core\Plugin\Context\ContextInterface.

Class

ContextInterface
Interface for context.

Namespace

Drupal\Core\Plugin\Context

Code

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