public ListDataDefinition::setDataType($type)
Sets the data type.
Parameters
string $type: The data type to set.
Return value
static The object itself for chaining.
Overrides DataDefinition::setDataType
File
- core/lib/Drupal/Core/TypedData/ListDataDefinition.php, line 65
Class
- ListDataDefinition
- A typed data definition class for defining lists.
Namespace
Drupal\Core\TypedData
Code
1 2 3 4 5 | public function setDataType( $type ) { if ( $type != 'list' ) { throw new \LogicException( 'Lists must always be of data type "list".' ); } } |
Please login to continue.