BaseFieldDefinition::getType

public BaseFieldDefinition::getType() Returns the field type. Return value string The field type, i.e. the id of a field type plugin. For example 'text'. Overrides FieldDefinitionInterface::getType See also \Drupal\Core\Field\FieldTypePluginManagerInterface File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 132 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getType() { return $this->type; }

BaseFieldDefinition::isBaseField

public BaseFieldDefinition::isBaseField() Determines whether the field is a base field. Base fields are not specific to a given bundle or a set of bundles. This excludes configurable fields, as they are always attached to a specific bundle. Return value bool Whether the field is a base field. Overrides FieldStorageDefinitionInterface::isBaseField File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 677 Class BaseFieldDefinition A class for defining entity fields. Namespace Dru

BaseFieldDefinition::getUniqueStorageIdentifier

public BaseFieldDefinition::getUniqueStorageIdentifier() Returns a unique identifier for the field. Return value string Overrides FieldStorageDefinitionInterface::getUniqueStorageIdentifier File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 711 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getUniqueStorageIdentifier() { return $this->getTargetEntityTypeId() . '-' . $this->getName(); }

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

BaseFieldDefinition::getTargetBundle

public BaseFieldDefinition::getTargetBundle() Gets the bundle the field is attached to. This method should not be confused with EntityInterface::bundle() (configurable fields are config entities, and thus implement both interfaces): FieldDefinitionInterface::getTargetBundle() answers "as a field, which bundle are you attached to?". EntityInterface::bundle() answers "as a (config) entity, what is your own bundle?" (not relevant in our case, the config entity types used to store the definitions

BaseFieldDefinition::getProvider

public BaseFieldDefinition::getProvider() Returns the name of the provider of this field. Return value string The provider name; e.g., the module name. Overrides FieldStorageDefinitionInterface::getProvider File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 195 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getProvider() { return isset($this->definition['provider']) ? $this->definition['provider'] : NUL

BaseFieldDefinition::getSettings

public BaseFieldDefinition::getSettings() Returns the array of settings, as required by the used class. See the documentation of the class for supported or required settings. Return value array The array of settings. Overrides DataDefinition::getSettings File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 139 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getSettings() { return $this->getItemDefinition()-&g

BaseFieldDefinition::getSetting

public BaseFieldDefinition::getSetting($setting_name) Returns the value of a given setting. Parameters string $setting_name: The setting name. Return value mixed The setting value. Overrides DataDefinition::getSetting File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 180 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getSetting($setting_name) { return $this->getItemDefinition()->getSetting($setting_na

BaseFieldDefinition::getSchema

public BaseFieldDefinition::getSchema() Returns the field schema. Note that this method returns an empty array for computed fields which have no schema. Return value array[] The field schema, as an array of key/value pairs in the format returned by \Drupal\Core\Field\FieldItemInterface::schema(): columns: An array of Schema API column specifications, keyed by column name. This specifies what comprises a single value for a given field. No assumptions should be made on how storage backends inte

BaseFieldDefinition::getName

public BaseFieldDefinition::getName() Returns the machine name of the field. This defines how the field data is accessed from the entity. For example, if the field name is "foo", then $entity->foo returns its data. Return value string The field name. Overrides FieldDefinitionInterface::getName File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 111 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getName() {