function FieldDefinitionInterface::getName
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldDefinitionInterface.php \Drupal\Core\Field\FieldDefinitionInterface::getName()
- 10 core/lib/Drupal/Core/Field/FieldDefinitionInterface.php \Drupal\Core\Field\FieldDefinitionInterface::getName()
- 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\FieldCode
public function getName();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.