class BaseFieldDefinitionTest in Drupal 10
Same name in this branch
- 10 core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest
- 10 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
- 9 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
Stub class for BaseFieldDefinition.
Hierarchy
- class \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\ArrayAccess, DataDefinitionInterface uses TypedDataTrait
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
- class \Drupal\Core\Field\BaseFieldDefinition implements FieldDefinitionInterface, FieldStorageDefinitionInterface, RequiredFieldStorageDefinitionInterface uses UnchangingCacheableDependencyTrait, FieldInputValueNormalizerTrait
- class \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
- class \Drupal\Core\Field\BaseFieldDefinition implements FieldDefinitionInterface, FieldStorageDefinitionInterface, RequiredFieldStorageDefinitionInterface uses UnchangingCacheableDependencyTrait, FieldInputValueNormalizerTrait
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
Expanded class hierarchy of BaseFieldDefinitionTest
File
- core/
modules/ migrate/ tests/ src/ Unit/ Plugin/ migrate/ destination/ EntityTestBase.php, line 63 - Contains \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase.
Namespace
Drupal\Tests\migrate\Unit\Plugin\migrate\destinationView source
class BaseFieldDefinitionTest extends BaseFieldDefinition {
public static function create($type) {
return new static([]);
}
public function getSettings() {
return [];
}
public function getType() {
return 'integer';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseFieldDefinition:: |
protected | property | ||
BaseFieldDefinition:: |
protected | property | An array of field property definitions. | |
BaseFieldDefinition:: |
protected | property | The field schema. | |
BaseFieldDefinition:: |
protected | property | The field type. | |
BaseFieldDefinition:: |
public | function | Adds constraints for a given field item property. | |
BaseFieldDefinition:: |
public static | function | Creates a new field definition based upon a field storage definition. | |
BaseFieldDefinition:: |
public static | function |
Creates a new list data definition for items of the given data type. Overrides ListDataDefinition:: |
|
BaseFieldDefinition:: |
public | function |
Returns the maximum number of items allowed for the field. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the field columns, as defined in the field schema. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Gets an object that can be saved in configuration. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the default value for the field in a newly created entity. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the default value callback for the field. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the default value literal for the field. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the default display options for the field. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the field storage definition. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function | Returns the initial value for the field. | |
BaseFieldDefinition:: |
public | function | Returns the name of the field that will be used for getting initial values. | |
BaseFieldDefinition:: |
public | function |
Returns the name of the main property, if any. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the machine name of the field. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Gets an options provider for the given field item property. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Gets the definition of a contained property. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Gets an array of property definitions of contained properties. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the names of the field's subproperties. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the name of the provider of this field. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the field schema. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the value of a given setting. Overrides DataDefinition:: |
|
BaseFieldDefinition:: |
public | function |
Gets the bundle the field is attached to. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the ID of the entity type the field is attached to. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns a unique identifier for the field. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns a unique identifier for the field storage. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the storage behavior for this field. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Determines whether the field is a base field. Overrides FieldStorageDefinitionInterface:: |
1 |
BaseFieldDefinition:: |
public | function |
Returns whether the field is deleted or not. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the display for the field can be configured. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Determines whether the data value is internal. Overrides DataDefinition:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field can contain multiple items. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field storage is revisionable. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field storage is required. Overrides RequiredFieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field is translatable. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function | Sets the maximum number of items allowed for the field. | |
BaseFieldDefinition:: |
public | function | Sets the storage behavior for this field. | |
BaseFieldDefinition:: |
public | function | ||
BaseFieldDefinition:: |
public | function | ||
BaseFieldDefinition:: |
public | function | Sets whether the field storage is deleted. | |
BaseFieldDefinition:: |
public | function | Sets whether the display for the field can be configured. | |
BaseFieldDefinition:: |
public | function | Sets the display options for the field in forms or rendered entities. | |
BaseFieldDefinition:: |
public | function | Sets an initial value for the field. | |
BaseFieldDefinition:: |
public | function | Sets a field that will be used for getting initial values. | |
BaseFieldDefinition:: |
public | function | Sets the field name. | |
BaseFieldDefinition:: |
public | function | Sets constraints for a given field item property. | |
BaseFieldDefinition:: |
public | function | Sets the name of the provider of this field. | |
BaseFieldDefinition:: |
public | function | Sets whether the field is revisionable. | |
BaseFieldDefinition:: |
public | function |
Sets a definition setting. Overrides DataDefinition:: |
|
BaseFieldDefinition:: |
public | function |
Note that the method does not unset existing settings not specified in the
incoming $settings array. Overrides DataDefinition:: |
|
BaseFieldDefinition:: |
public | function | Sets whether the field storage is required. | |
BaseFieldDefinition:: |
public | function | Sets the bundle this field is defined for. | |
BaseFieldDefinition:: |
public | function | Sets the ID of the type of the entity this field is attached to. | |
BaseFieldDefinition:: |
public | function |
Sets whether the field is translatable. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Magic method: Implements a deep clone. Overrides ListDataDefinition:: |
|
BaseFieldDefinition:: |
public | function |
Overrides DataDefinition:: |
|
BaseFieldDefinitionTest:: |
public static | function |
Creates a new field definition. Overrides BaseFieldDefinition:: |
|
BaseFieldDefinitionTest:: |
public | function |
Returns the array of settings, as required by the used class. Overrides BaseFieldDefinition:: |
|
BaseFieldDefinitionTest:: |
public | function |
Returns the field type. Overrides BaseFieldDefinition:: |
|
DataDefinition:: |
protected | property | The array holding values for all definition keys. | |
DataDefinition:: |
public | function |
Adds a validation constraint. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns a validation constraint. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns an array of validation constraints. Overrides DataDefinitionInterface:: |
1 |
DataDefinition:: |
public | function |
Returns a human readable description. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns a human readable label. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether the data value is computed. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns whether the data is multi-valued, i.e. a list of data items. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether the data is read-only. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether a data value is required. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | Sets the class used for creating the typed data object. | |
DataDefinition:: |
public | function | Sets whether the data is computed. | |
DataDefinition:: |
public | function | Sets an array of validation constraints. | |
DataDefinition:: |
public | function | Sets the human-readable description. | |
DataDefinition:: |
public | function | Sets the whether the data value should be internal. | |
DataDefinition:: |
public | function | Sets the human-readable label. | |
DataDefinition:: |
public | function | Sets whether the data is read-only. | |
DataDefinition:: |
public | function | Sets whether the data is required. | |
DataDefinition:: |
public | function | Returns all definition values as array. | |
FieldInputValueNormalizerTrait:: |
protected static | function | Ensure a field value is transformed into a format keyed by delta. | |
FieldStorageDefinitionInterface:: |
constant | Value indicating a field accepts an unlimited number of values. | ||
ListDataDefinition:: |
protected | property | The data definition of a list item. | |
ListDataDefinition:: |
public static | function |
Creates a new data definition object. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function |
Returns the class used for creating the typed data object. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function |
Returns the data type of the data. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function |
Gets the data definition of an item of the list. Overrides ListDataDefinitionInterface:: |
|
ListDataDefinition:: |
public | function |
Sets the data type. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function | Sets the item definition. | |
ListDataDefinition:: |
public | function |
Constructs a new data definition object. Overrides DataDefinition:: |
|
TypedDataTrait:: |
protected | property | The typed data manager used for creating the data types. | |
TypedDataTrait:: |
public | function | Gets the typed data manager. | 1 |
TypedDataTrait:: |
public | function | Sets the typed data manager. | 1 |
UnchangingCacheableDependencyTrait:: |
public | function | ||
UnchangingCacheableDependencyTrait:: |
public | function | ||
UnchangingCacheableDependencyTrait:: |
public | function |