function FieldDefinitionInterface::getName

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FieldDefinitionInterface.php \Drupal\Core\Field\FieldDefinitionInterface::getName()
  2. 8.9.x core/lib/Drupal/Core/Field/FieldDefinitionInterface.php \Drupal\Core\Field\FieldDefinitionInterface::getName()
  3. 11.x core/lib/Drupal/Core/Field/FieldDefinitionInterface.php \Drupal\Core\Field\FieldDefinitionInterface::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.

3 methods override FieldDefinitionInterface::getName()
BaseFieldDefinition::getName in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Returns the machine name of the field.
FieldConfigBase::getName in core/lib/Drupal/Core/Field/FieldConfigBase.php
Returns the machine name of the field.
FieldDefinition::getName in core/lib/Drupal/Core/Field/FieldDefinition.php
Returns the machine name of the field.

File

core/lib/Drupal/Core/Field/FieldDefinitionInterface.php, line 62

Class

FieldDefinitionInterface
Defines an interface for entity field definitions.

Namespace

Drupal\Core\Field

Code

public function getName();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.