DataDefinition::getClass

public DataDefinition::getClass() Returns the class used for creating the typed data object. If not specified, the default class of the data type will be returned. Return value string The class used for creating the typed data object. Overrides DataDefinitionInterface::getClass File core/lib/Drupal/Core/TypedData/DataDefinition.php, line 188 Class DataDefinition A typed data definition class for defining data based on defined data types. Namespace Drupal\Core\TypedData Code public fun

DataDefinition::createFromDataType

public static DataDefinition::createFromDataType($type) Creates a new data definition object. This method is typically used by \Drupal\Core\TypedData\TypedDataManager::createDataDefinition() to build a definition object for an arbitrary data type. When the definition class is known, it is recommended to directly use the static create() method on that class instead; e.g.: $map_definition = \Drupal\Core\TypedData\MapDataDefinition::create(); Parameters string $data_type: The data type, for wh

DataDefinition::create

public static DataDefinition::create($type) Creates a new data definition. Parameters string $type: The data type of the data; e.g., 'string', 'integer' or 'any'. Return value static A new DataDefinition object. File core/lib/Drupal/Core/TypedData/DataDefinition.php, line 26 Class DataDefinition A typed data definition class for defining data based on defined data types. Namespace Drupal\Core\TypedData Code public static function create($type) { $definition['type'] = $type; retur

DataDefinition::addConstraint

public DataDefinition::addConstraint($constraint_name, $options = NULL) Adds a validation constraint. See \Drupal\Core\TypedData\DataDefinitionInterface::getConstraints() for details. Parameters string $constraint_name: The name of the constraint to add, i.e. its plugin id. array|null $options: The constraint options as required by the constraint plugin, or NULL. Return value static The object itself for chaining. Overrides DataDefinitionInterface::addConstraint File core/lib/Drupal/Core/Type

DataDefinition::$definition

The array holding values for all definition keys. Type: array File core/lib/Drupal/Core/TypedData/DataDefinition.php, line 15 Class DataDefinition A typed data definition class for defining data based on defined data types. Namespace Drupal\Core\TypedData Code protected $definition = array();

DataDefinition

A typed data definition class for defining data based on defined data types. Hierarchy class \Drupal\Core\TypedData\DataDefinition implements \ArrayAccess, DataDefinitionInterface File core/lib/Drupal/Core/TypedData/DataDefinition.php, line 8 Namespace Drupal\Core\TypedData Members Name Modifiers Type Description DataDefinition::$definition protected property The array holding values for all definition keys. DataDefinition::addConstraint public function Adds a va

DataCommand::__construct

public DataCommand::__construct($selector, $name, $value) Constructs a DataCommand object. Parameters string $selector: A CSS selector for the elements to which the data will be attached. string $name: The key of the data to be attached to elements matched by the selector. mixed $value: The value of the data to be attached to elements matched by the selector. File core/lib/Drupal/Core/Ajax/DataCommand.php, line 54 Class DataCommand An AJAX command for implementing jQuery's data() method.

DataCommand::render

public DataCommand::render() Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface::render File core/lib/Drupal/Core/Ajax/DataCommand.php, line 63 Class DataCommand An AJAX command for implementing jQuery's data() method. Namespace Drupal\Core\Ajax Code public function render() { return array( 'command' => 'data', 'selector' => $this->selector, 'name' => $this->name, 'value' => $this->value, ); }

DataCommand::$value

The value of the data to be attached to elements matched by the selector. The data is not limited to strings; it can be any format. Type: mixed File core/lib/Drupal/Core/Ajax/DataCommand.php, line 42 Class DataCommand An AJAX command for implementing jQuery's data() method. Namespace Drupal\Core\Ajax Code protected $value;

DataCommand::$selector

A CSS selector string for elements to which data will be attached. If the command is a response to a request from an #ajax form element then this value can be NULL. Type: string File core/lib/Drupal/Core/Ajax/DataCommand.php, line 26 Class DataCommand An AJAX command for implementing jQuery's data() method. Namespace Drupal\Core\Ajax Code protected $selector;