You are here

public function FieldDefinitionInterface::getName in Drupal 8

Same name and namespace in other branches
  1. 9 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();