class BaseFieldDefinitionTest
Same name in this branch
- 9 core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest
Same name in other branches
- 8.9.x core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
- 8.9.x 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
- 10 core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest
- 11.x core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest
- 11.x core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php \Drupal\Tests\Core\Entity\BaseFieldDefinitionTest
Stub class for BaseFieldDefinition.
Hierarchy
- class \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\DataDefinitionInterface, \Drupal\Core\TypedData\ArrayAccess uses \Drupal\Core\TypedData\TypedDataTrait
- class \Drupal\Core\TypedData\ListDataDefinition extends \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\ListDataDefinitionInterface
- class \Drupal\Core\Field\BaseFieldDefinition extends \Drupal\Core\TypedData\ListDataDefinition implements \Drupal\Core\Field\FieldDefinitionInterface, \Drupal\Core\Field\FieldStorageDefinitionInterface, \Drupal\Core\Field\RequiredFieldStorageDefinitionInterface uses \Drupal\Core\Cache\UnchangingCacheableDependencyTrait, \Drupal\Core\Field\FieldInputValueNormalizerTrait
- class \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\BaseFieldDefinitionTest extends \Drupal\Core\Field\BaseFieldDefinition
- class \Drupal\Core\Field\BaseFieldDefinition extends \Drupal\Core\TypedData\ListDataDefinition implements \Drupal\Core\Field\FieldDefinitionInterface, \Drupal\Core\Field\FieldStorageDefinitionInterface, \Drupal\Core\Field\RequiredFieldStorageDefinitionInterface uses \Drupal\Core\Cache\UnchangingCacheableDependencyTrait, \Drupal\Core\Field\FieldInputValueNormalizerTrait
- class \Drupal\Core\TypedData\ListDataDefinition extends \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\ListDataDefinitionInterface
Expanded class hierarchy of BaseFieldDefinitionTest
File
-
core/
modules/ migrate/ tests/ src/ Unit/ Plugin/ migrate/ destination/ EntityTestBase.php, line 63
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
BaseFieldDefinition::$indexes | protected | property | |||
BaseFieldDefinition::$propertyDefinitions | protected | property | An array of field property definitions. | ||
BaseFieldDefinition::$schema | protected | property | The field schema. | ||
BaseFieldDefinition::$type | protected | property | The field type. | ||
BaseFieldDefinition::addPropertyConstraints | public | function | Adds constraints for a given field item property. | ||
BaseFieldDefinition::createFromFieldStorageDefinition | public static | function | Creates a new field definition based upon a field storage definition. | ||
BaseFieldDefinition::createFromItemType | public static | function | Creates a new list data definition for items of the given data type. | Overrides ListDataDefinition::createFromItemType | |
BaseFieldDefinition::getCardinality | public | function | Returns the maximum number of items allowed for the field. | Overrides FieldStorageDefinitionInterface::getCardinality | |
BaseFieldDefinition::getColumns | public | function | Returns the field columns, as defined in the field schema. | Overrides FieldStorageDefinitionInterface::getColumns | |
BaseFieldDefinition::getConfig | public | function | Gets an object that can be saved in configuration. | Overrides FieldDefinitionInterface::getConfig | |
BaseFieldDefinition::getDefaultValue | public | function | Returns the default value for the field in a newly created entity. | Overrides FieldDefinitionInterface::getDefaultValue | |
BaseFieldDefinition::getDefaultValueCallback | public | function | Returns the default value callback for the field. | Overrides FieldDefinitionInterface::getDefaultValueCallback | |
BaseFieldDefinition::getDefaultValueLiteral | public | function | Returns the default value literal for the field. | Overrides FieldDefinitionInterface::getDefaultValueLiteral | |
BaseFieldDefinition::getDisplayOptions | public | function | Returns the default display options for the field. | Overrides FieldDefinitionInterface::getDisplayOptions | |
BaseFieldDefinition::getFieldStorageDefinition | public | function | Returns the field storage definition. | Overrides FieldDefinitionInterface::getFieldStorageDefinition | |
BaseFieldDefinition::getInitialValue | public | function | Returns the initial value for the field. | ||
BaseFieldDefinition::getInitialValueFromField | public | function | Returns the name of the field that will be used for getting initial values. | ||
BaseFieldDefinition::getMainPropertyName | public | function | Returns the name of the main property, if any. | Overrides FieldStorageDefinitionInterface::getMainPropertyName | |
BaseFieldDefinition::getName | public | function | Returns the machine name of the field. | Overrides FieldDefinitionInterface::getName | |
BaseFieldDefinition::getOptionsProvider | public | function | Gets an options provider for the given field item property. | Overrides FieldStorageDefinitionInterface::getOptionsProvider | |
BaseFieldDefinition::getPropertyDefinition | public | function | Gets the definition of a contained property. | Overrides FieldStorageDefinitionInterface::getPropertyDefinition | |
BaseFieldDefinition::getPropertyDefinitions | public | function | Gets an array of property definitions of contained properties. | Overrides FieldStorageDefinitionInterface::getPropertyDefinitions | |
BaseFieldDefinition::getPropertyNames | public | function | Returns the names of the field's subproperties. | Overrides FieldStorageDefinitionInterface::getPropertyNames | |
BaseFieldDefinition::getProvider | public | function | Returns the name of the provider of this field. | Overrides FieldStorageDefinitionInterface::getProvider | |
BaseFieldDefinition::getSchema | public | function | Returns the field schema. | Overrides FieldStorageDefinitionInterface::getSchema | |
BaseFieldDefinition::getSetting | public | function | Returns the value of a given setting. | Overrides DataDefinition::getSetting | |
BaseFieldDefinition::getTargetBundle | public | function | Gets the bundle the field is attached to. | Overrides FieldDefinitionInterface::getTargetBundle | |
BaseFieldDefinition::getTargetEntityTypeId | public | function | Returns the ID of the entity type the field is attached to. | Overrides FieldDefinitionInterface::getTargetEntityTypeId | |
BaseFieldDefinition::getUniqueIdentifier | public | function | Returns a unique identifier for the field. | Overrides FieldDefinitionInterface::getUniqueIdentifier | |
BaseFieldDefinition::getUniqueStorageIdentifier | public | function | Returns a unique identifier for the field storage. | Overrides FieldStorageDefinitionInterface::getUniqueStorageIdentifier | |
BaseFieldDefinition::hasCustomStorage | public | function | Returns the storage behavior for this field. | Overrides FieldStorageDefinitionInterface::hasCustomStorage | |
BaseFieldDefinition::isBaseField | public | function | Determines whether the field is a base field. | Overrides FieldStorageDefinitionInterface::isBaseField | 1 |
BaseFieldDefinition::isDeleted | public | function | Returns whether the field is deleted or not. | Overrides FieldStorageDefinitionInterface::isDeleted | |
BaseFieldDefinition::isDisplayConfigurable | public | function | Returns whether the display for the field can be configured. | Overrides FieldDefinitionInterface::isDisplayConfigurable | |
BaseFieldDefinition::isInternal | public | function | Determines whether the data value is internal. | Overrides DataDefinition::isInternal | |
BaseFieldDefinition::isMultiple | public | function | Returns whether the field can contain multiple items. | Overrides FieldStorageDefinitionInterface::isMultiple | |
BaseFieldDefinition::isRevisionable | public | function | Returns whether the field storage is revisionable. | Overrides FieldStorageDefinitionInterface::isRevisionable | |
BaseFieldDefinition::isStorageRequired | public | function | Returns whether the field storage is required. | Overrides RequiredFieldStorageDefinitionInterface::isStorageRequired | |
BaseFieldDefinition::isTranslatable | public | function | Returns whether the field is translatable. | Overrides FieldDefinitionInterface::isTranslatable | |
BaseFieldDefinition::setCardinality | public | function | Sets the maximum number of items allowed for the field. | ||
BaseFieldDefinition::setCustomStorage | public | function | Sets the storage behavior for this field. | ||
BaseFieldDefinition::setDefaultValue | public | function | |||
BaseFieldDefinition::setDefaultValueCallback | public | function | |||
BaseFieldDefinition::setDeleted | public | function | Sets whether the field storage is deleted. | ||
BaseFieldDefinition::setDisplayConfigurable | public | function | Sets whether the display for the field can be configured. | ||
BaseFieldDefinition::setDisplayOptions | public | function | Sets the display options for the field in forms or rendered entities. | ||
BaseFieldDefinition::setInitialValue | public | function | Sets an initial value for the field. | ||
BaseFieldDefinition::setInitialValueFromField | public | function | Sets a field that will be used for getting initial values. | ||
BaseFieldDefinition::setName | public | function | Sets the field name. | ||
BaseFieldDefinition::setPropertyConstraints | public | function | Sets constraints for a given field item property. | ||
BaseFieldDefinition::setProvider | public | function | Sets the name of the provider of this field. | ||
BaseFieldDefinition::setRevisionable | public | function | Sets whether the field is revisionable. | ||
BaseFieldDefinition::setSetting | public | function | Sets a definition setting. | Overrides DataDefinition::setSetting | |
BaseFieldDefinition::setSettings | public | function | Note that the method does not unset existing settings not specified in the incoming $settings array. |
Overrides DataDefinition::setSettings | |
BaseFieldDefinition::setStorageRequired | public | function | Sets whether the field storage is required. | ||
BaseFieldDefinition::setTargetBundle | public | function | Sets the bundle this field is defined for. | ||
BaseFieldDefinition::setTargetEntityTypeId | public | function | Sets the ID of the type of the entity this field is attached to. | ||
BaseFieldDefinition::setTranslatable | public | function | Sets whether the field is translatable. | Overrides FieldStorageDefinitionInterface::setTranslatable | |
BaseFieldDefinition::__clone | public | function | Magic method: Implements a deep clone. | Overrides ListDataDefinition::__clone | |
BaseFieldDefinition::__sleep | public | function | Overrides DataDefinition::__sleep | ||
BaseFieldDefinitionTest::create | public static | function | Creates a new field definition. | Overrides BaseFieldDefinition::create | |
BaseFieldDefinitionTest::getSettings | public | function | Returns the array of settings, as required by the used class. | Overrides BaseFieldDefinition::getSettings | |
BaseFieldDefinitionTest::getType | public | function | Returns the field type. | Overrides BaseFieldDefinition::getType | |
DataDefinition::$definition | protected | property | The array holding values for all definition keys. | ||
DataDefinition::addConstraint | public | function | Adds a validation constraint. | Overrides DataDefinitionInterface::addConstraint | |
DataDefinition::getConstraint | public | function | Returns a validation constraint. | Overrides DataDefinitionInterface::getConstraint | |
DataDefinition::getConstraints | public | function | Returns an array of validation constraints. | Overrides DataDefinitionInterface::getConstraints | 1 |
DataDefinition::getDescription | public | function | Returns a human readable description. | Overrides DataDefinitionInterface::getDescription | |
DataDefinition::getLabel | public | function | Returns a human readable label. | Overrides DataDefinitionInterface::getLabel | |
DataDefinition::isComputed | public | function | Determines whether the data value is computed. | Overrides DataDefinitionInterface::isComputed | |
DataDefinition::isList | public | function | Returns whether the data is multi-valued, i.e. a list of data items. | Overrides DataDefinitionInterface::isList | |
DataDefinition::isReadOnly | public | function | Determines whether the data is read-only. | Overrides DataDefinitionInterface::isReadOnly | |
DataDefinition::isRequired | public | function | Determines whether a data value is required. | Overrides DataDefinitionInterface::isRequired | |
DataDefinition::offsetExists | public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. |
||
DataDefinition::offsetGet | public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. |
||
DataDefinition::offsetSet | public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. |
||
DataDefinition::offsetUnset | public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. |
||
DataDefinition::setClass | public | function | Sets the class used for creating the typed data object. | ||
DataDefinition::setComputed | public | function | Sets whether the data is computed. | ||
DataDefinition::setConstraints | public | function | Sets an array of validation constraints. | ||
DataDefinition::setDescription | public | function | Sets the human-readable description. | ||
DataDefinition::setInternal | public | function | Sets the whether the data value should be internal. | ||
DataDefinition::setLabel | public | function | Sets the human-readable label. | ||
DataDefinition::setReadOnly | public | function | Sets whether the data is read-only. | ||
DataDefinition::setRequired | public | function | Sets whether the data is required. | ||
DataDefinition::toArray | public | function | Returns all definition values as array. | ||
FieldInputValueNormalizerTrait::normalizeValue | protected static | function | Ensure a field value is transformed into a format keyed by delta. | ||
FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED | constant | Value indicating a field accepts an unlimited number of values. | |||
ListDataDefinition::$itemDefinition | protected | property | The data definition of a list item. | ||
ListDataDefinition::createFromDataType | public static | function | Creates a new data definition object. | Overrides DataDefinition::createFromDataType | |
ListDataDefinition::getClass | public | function | Returns the class used for creating the typed data object. | Overrides DataDefinition::getClass | |
ListDataDefinition::getDataType | public | function | Returns the data type of the data. | Overrides DataDefinition::getDataType | |
ListDataDefinition::getItemDefinition | public | function | Gets the data definition of an item of the list. | Overrides ListDataDefinitionInterface::getItemDefinition | |
ListDataDefinition::setDataType | public | function | Sets the data type. | Overrides DataDefinition::setDataType | |
ListDataDefinition::setItemDefinition | public | function | Sets the item definition. | ||
ListDataDefinition::__construct | public | function | Constructs a new data definition object. | Overrides DataDefinition::__construct | |
TypedDataTrait::$typedDataManager | protected | property | The typed data manager used for creating the data types. | ||
TypedDataTrait::getTypedDataManager | public | function | Gets the typed data manager. | 2 | |
TypedDataTrait::setTypedDataManager | public | function | Sets the typed data manager. | 2 | |
UnchangingCacheableDependencyTrait::getCacheContexts | public | function | 1 | ||
UnchangingCacheableDependencyTrait::getCacheMaxAge | public | function | 3 | ||
UnchangingCacheableDependencyTrait::getCacheTags | public | function | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.