BaseFieldDefinition::setDisplayConfigurable

public BaseFieldDefinition::setDisplayConfigurable($display_context, $configurable) Sets whether the display for the field can be configured. Parameters string $display_context: The display context. Either 'view' or 'form'. bool $configurable: Whether the display options can be configured (e.g., via the "Manage display" / "Manage form display" UI screens). If TRUE, the options specified via getDisplayOptions() act as defaults. Return value static The object itself for chaining. File core/lib/

BaseFieldDefinition::setPropertyConstraints

public BaseFieldDefinition::setPropertyConstraints($name, array $constraints) Sets constraints for a given field item property. Note: this overwrites any existing property constraints. If you need to add to the existing constraints, use \Drupal\Core\Field\BaseFieldDefinition::addPropertyConstraints() Parameters string $name: The name of the property to set constraints for. array $constraints: The constraints to set. Return value static The object itself for chaining. File core/lib/Drupal/Core

BaseFieldDefinition::isMultiple

public BaseFieldDefinition::isMultiple() Returns whether the field can contain multiple items. Return value bool TRUE if the field can contain multiple items, FALSE otherwise. Overrides FieldStorageDefinitionInterface::isMultiple File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 281 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function isMultiple() { $cardinality = $this->getCardinality(); return ($cardinality

BaseFieldDefinition::setCardinality

public BaseFieldDefinition::setCardinality($cardinality) Sets the maximum number of items allowed for the field. Possible values are positive integers or FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED. Parameters int $cardinality: The field cardinality. Return value $this File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 273 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function setCardinality($cardinality) {

BaseFieldDefinition::isTranslatable

public BaseFieldDefinition::isTranslatable() Returns whether the field is translatable. Return value bool TRUE if the field is translatable. Overrides FieldDefinitionInterface::isTranslatable File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 215 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function isTranslatable() { return !empty($this->definition['translatable']); }

BaseFieldDefinition::isQueryable

public BaseFieldDefinition::isQueryable() Determines whether the field is queryable via QueryInterface. Return value bool TRUE if the field is queryable. Overrides FieldStorageDefinitionInterface::isQueryable File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 289 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function isQueryable() { return isset($this->definition['queryable']) ? $this->definition['queryable'] :

BaseFieldDefinition::isRevisionable

public BaseFieldDefinition::isRevisionable() Returns whether the field is revisionable. Return value bool TRUE if the field is revisionable. Overrides FieldStorageDefinitionInterface::isRevisionable File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 236 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function isRevisionable() { return !empty($this->definition['revisionable']); }

BaseFieldDefinition::setCustomStorage

public BaseFieldDefinition::setCustomStorage($custom_storage) Sets the storage behavior for this field. Parameters bool $custom_storage: Pass FALSE if the storage takes care of storing the field, TRUE otherwise. Return value $this Throws \LogicException Thrown if custom storage is to be set to FALSE for a computed field. File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 693 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code pub

BaseFieldDefinition::hasCustomStorage

public BaseFieldDefinition::hasCustomStorage() Returns the storage behavior for this field. Indicates whether the entity type's storage should take care of storing the field values or whether it is handled separately; e.g. by the module providing the field. Return value bool FALSE if the storage takes care of storing the field, TRUE otherwise. Overrides FieldStorageDefinitionInterface::hasCustomStorage File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 670 Class BaseFieldDefinit

BaseFieldDefinition::getTargetEntityTypeId

public BaseFieldDefinition::getTargetEntityTypeId() Returns the ID of the entity type the field is attached to. This method should not be confused with EntityInterface::getEntityTypeId() (configurable fields are config entities, and thus implement both interfaces): FieldDefinitionInterface::getTargetEntityTypeId() answers "as a field, which entity type are you attached to?". EntityInterface::getEntityTypeId() answers "as a (config) entity, what is your own entity type?". Return value string