Interface for typed data objects.
Expanded class hierarchy of TypedDataInterface
All classes that implement TypedDataInterface
interface TypedDataInterface {
/**
* Gets the data type.
*
* @return string
* The data type of the wrapped data.
*/
public function getType();
/**
* Gets the data definition.
*
* @return array
* The data definition array.
*/
public function getDefinition();
/**
* Gets the data value.
*
* @return mixed
*/
public function getValue();
/**
* Sets the data value.
*
* @param mixed $value
* The value to set in the format as documented for the data type or NULL to
* unset the data value.
*
* @throws \Drupal\Core\TypedData\ReadOnlyException
* If the data is read-only.
*/
public function setValue($value);
/**
* Returns a string representation of the data.
*
* @return string
*/
public function getString();
/**
* Validates the currently set data value.
*/
public function validate();
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TypedDataInterface:: |
public | function | Gets the data type. | 1 |
TypedDataInterface:: |
public | function | Gets the data definition. | 1 |
TypedDataInterface:: |
public | function | Gets the data value. | 1 |
TypedDataInterface:: |
public | function | Sets the data value. | 1 |
TypedDataInterface:: |
public | function | Returns a string representation of the data. | 1 |
TypedDataInterface:: |
public | function | Validates the currently set data value. | 13 |