class FieldStorageDefinition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/entity_test/src/FieldStorageDefinition.php \Drupal\entity_test\FieldStorageDefinition
A custom field storage definition class.
For convenience we extend from BaseFieldDefinition although this should not implement FieldDefinitionInterface.
@todo Provide and make use of a proper FieldStorageDefinition class instead: https://www.drupal.org/node/2280639.
Hierarchy
- class \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\ArrayAccess, DataDefinitionInterface
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
- class \Drupal\Core\Field\BaseFieldDefinition implements FieldDefinitionInterface, FieldStorageDefinitionInterface uses UnchangingCacheableDependencyTrait
- class \Drupal\entity_test\FieldStorageDefinition
- class \Drupal\Core\Field\BaseFieldDefinition implements FieldDefinitionInterface, FieldStorageDefinitionInterface uses UnchangingCacheableDependencyTrait
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
Expanded class hierarchy of FieldStorageDefinition
4 files declare their use of FieldStorageDefinition
- EntityDefinitionTestTrait.php in core/
modules/ system/ src/ Tests/ Entity/ EntityDefinitionTestTrait.php - Contains \Drupal\system\Tests\Entity\EntityDefinitionTestTrait.
- EntityTestBaseFieldDisplay.php in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTestBaseFieldDisplay.php - Contains \Drupal\entity_test\Entity\EntityTestBaseFieldDisplay.
- entity_schema_test.module in core/
modules/ system/ tests/ modules/ entity_schema_test/ entity_schema_test.module - Test module for the entity API providing a bundle field.
- FieldModuleUninstallValidatorTest.php in core/
modules/ system/ src/ Tests/ Field/ FieldModuleUninstallValidatorTest.php - Contains \Drupal\system\Tests\Field\FieldModuleUninstallValidatorTest.
File
- core/
modules/ system/ tests/ modules/ entity_test/ src/ FieldStorageDefinition.php, line 21 - Contains \Drupal\entity_test\FieldStorageDefinition.
Namespace
Drupal\entity_testView source
class FieldStorageDefinition extends BaseFieldDefinition {
/**
* {@inheritdoc}
*/
public function isBaseField() {
return FALSE;
}
}
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. Overrides ListDataDefinition:: |
|
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:: |
protected | function | Helper to retrieve the field item class. | |
BaseFieldDefinition:: |
public | function |
Returns the field storage definition. Overrides FieldDefinitionInterface:: |
|
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 |
Returns the array of settings, as required by the used class. 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 the field type. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns a unique identifier for the field. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns the storage behavior for this field. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the display for the field can be configured. Overrides FieldDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field can contain multiple items. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Determines whether the field is queryable via QueryInterface. Overrides FieldStorageDefinitionInterface:: |
|
BaseFieldDefinition:: |
public | function |
Returns whether the field is revisionable. Overrides FieldStorageDefinitionInterface:: |
|
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 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 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 queryable. | |
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 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 | ||
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 | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. | |
DataDefinition:: |
public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. | |
DataDefinition:: |
public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. | |
DataDefinition:: |
public | function | This is for BC support only. @todo: Remove in https://www.drupal.org/node/1928868. | |
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 | ||
DataDefinition:: |
public | function | Sets the human-readable description. | |
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. | |
FieldStorageDefinition:: |
public | function |
Determines whether the field is a base field. Overrides BaseFieldDefinition:: |
|
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:: |
|
UnchangingCacheableDependencyTrait:: |
public | function | ||
UnchangingCacheableDependencyTrait:: |
public | function | ||
UnchangingCacheableDependencyTrait:: |
public | function |