You are here

public static function ContextDefinition::create in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php \Drupal\Core\Plugin\Context\ContextDefinition::create()

Creates a new context definition.

Parameters

string $data_type: The data type for which to create the context definition. Defaults to 'any'.

Return value

static The created context definition object.

File

core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php, line 82
Contains \Drupal\Core\Plugin\Context\ContextDefinition.

Class

ContextDefinition
Defines a class for context definitions.

Namespace

Drupal\Core\Plugin\Context

Code

public static function create($data_type = 'any') {
  return new static($data_type);
}