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\ContextCode
public static function createFromContext(ContextInterface $old_context, $value);