Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldDefinitionInterface.php

function 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();

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal