function FieldDefinition::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
1 call to FieldDefinition::getName()
- FieldDefinition::getUniqueIdentifier in core/
lib/ Drupal/ Core/ Field/ FieldDefinition.php  - Returns a unique identifier for the field.
 
File
- 
              core/
lib/ Drupal/ Core/ Field/ FieldDefinition.php, line 64  
Class
- FieldDefinition
 - A class for defining entity field definitions.
 
Namespace
Drupal\Core\FieldCode
public function getName() {
  return $this->getFieldStorageDefinition()
    ->getName();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.