BaseFieldDefinition::getPropertyDefinitions

public BaseFieldDefinition::getPropertyDefinitions() Gets an array of property definitions of contained properties. Return value \Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name. Overrides FieldStorageDefinitionInterface::getPropertyDefinitions File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 536 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code pu

BaseFieldDefinition::getPropertyDefinition

public BaseFieldDefinition::getPropertyDefinition($name) Gets the definition of a contained property. Parameters string $name: The name of property. Return value \Drupal\Core\TypedData\DataDefinitionInterface|null The definition of the property or NULL if the property does not exist. Overrides FieldStorageDefinitionInterface::getPropertyDefinition File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 524 Class BaseFieldDefinition A class for defining entity fields. Namespace D

BaseFieldDefinition::getOptionsProvider

public BaseFieldDefinition::getOptionsProvider($property_name, FieldableEntityInterface $entity) Gets an options provider for the given field item property. Parameters string $property_name: The name of the property to get options for; e.g., 'value'. \Drupal\Core\Entity\FieldableEntityInterface $entity: The entity for which the options should be provided. Return value \Drupal\Core\TypedData\OptionsProviderInterface|null An options provider, or NULL if no options are defined. Overrides FieldSt

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() {

BaseFieldDefinition::getMainPropertyName

public BaseFieldDefinition::getMainPropertyName() Returns the name of the main property, if any. Some field items consist mainly of one main property, e.g. the value of a text field or the target_id of an entity reference. If the field item has no main property, the method returns NULL. Return value string|null The name of the value property, or NULL if there is none. Overrides FieldStorageDefinitionInterface::getMainPropertyName File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line

BaseFieldDefinition::getFieldStorageDefinition

public BaseFieldDefinition::getFieldStorageDefinition() Returns the field storage definition. Return value \Drupal\Core\Field\FieldStorageDefinitionInterface The field storage definition. Overrides FieldDefinitionInterface::getFieldStorageDefinition File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 704 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code public function getFieldStorageDefinition() { return $this; }

BaseFieldDefinition::getFieldItemClass

protected BaseFieldDefinition::getFieldItemClass() Helper to retrieve the field item class. @todo: Remove once getClass() adds in defaults. See https://www.drupal.org/node/2116341. File core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 565 Class BaseFieldDefinition A class for defining entity fields. Namespace Drupal\Core\Field Code protected function getFieldItemClass() { if ($class = $this->getItemDefinition()->getClass()) { return $class; } else { $type_de

BaseFieldDefinition::getDisplayOptions

public BaseFieldDefinition::getDisplayOptions($display_context) Returns the default display options for the field. If the field's display is configurable, the returned display options act as default values and may be overridden via the respective entity display. Otherwise, the display options will be applied to entity displays as is. Parameters string $display_context: The display context. Either 'view' or 'form'. Return value array|null The array of display options for the field, or NULL if

BaseFieldDefinition::getDefaultValueLiteral

public BaseFieldDefinition::getDefaultValueLiteral() Returns the default value literal for the field. This method retrieves the raw property assigned to the field definition. When computing the runtime default value for a field in a given entity, ::getDefaultValue() should be used instead. Return value array The default value for the field, as a numerically indexed array of items, each item being a property/value array (array() for no default value). Overrides FieldDefinitionInterface::getDefa

BaseFieldDefinition::getDefaultValueCallback

public BaseFieldDefinition::getDefaultValueCallback() Returns the default value callback for the field. This method retrieves the raw property assigned to the field definition. When computing the runtime default value for a field in a given entity, ::getDefaultValue() should be used instead. Return value string|null The default value callback for the field. Overrides FieldDefinitionInterface::getDefaultValueCallback See also FieldDefinitionInterface::getDefaultValue() FieldDefinitionInterface