W3cubDocs

/Drupal 8

class BaseFieldDefinition

A class for defining entity fields.

Hierarchy

File

core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 15

Namespace

Drupal\Core\Field

Members

Name Modifiers Type Description
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::create public static function Creates a new field definition. Overrides ListDataDefinition::create
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::getFieldItemClass protected function Helper to retrieve the field item class.
BaseFieldDefinition::getFieldStorageDefinition public function Returns the field storage definition. Overrides FieldDefinitionInterface::getFieldStorageDefinition
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::getSettings public function Returns the array of settings, as required by the used class. Overrides DataDefinition::getSettings
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::getType public function Returns the field type. Overrides FieldDefinitionInterface::getType
BaseFieldDefinition::getUniqueStorageIdentifier public function Returns a unique identifier for the field. 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
BaseFieldDefinition::isDisplayConfigurable public function Returns whether the display for the field can be configured. Overrides FieldDefinitionInterface::isDisplayConfigurable
BaseFieldDefinition::isMultiple public function Returns whether the field can contain multiple items. Overrides FieldStorageDefinitionInterface::isMultiple
BaseFieldDefinition::isQueryable public function Determines whether the field is queryable via QueryInterface. Overrides FieldStorageDefinitionInterface::isQueryable
BaseFieldDefinition::isRevisionable public function Returns whether the field is revisionable. Overrides FieldStorageDefinitionInterface::isRevisionable
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::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::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::setQueryable public function Sets whether the field is queryable.
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::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::__sleep public function
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
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
DataDefinition::setDescription public function Sets the human-readable description.
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.
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
UnchangingCacheableDependencyTrait::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
UnchangingCacheableDependencyTrait::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
UnchangingCacheableDependencyTrait::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!BaseFieldDefinition.php/class/BaseFieldDefinition/8.1.x