You are here

public function FieldItemBase::getLangcode in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldItemBase.php \Drupal\Core\Field\FieldItemBase::getLangcode()
  2. 9 core/lib/Drupal/Core/Field/FieldItemBase.php \Drupal\Core\Field\FieldItemBase::getLangcode()

Gets the langcode of the field values held in the object.

Return value

string The langcode.

Overrides FieldItemInterface::getLangcode

2 calls to FieldItemBase::getLangcode()
FieldTestItem::delete in core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php
Defines custom delete behavior for field values.
PathItem::postSave in core/modules/path/src/Plugin/Field/FieldType/PathItem.php
Defines custom post-save behavior for field values.

File

core/lib/Drupal/Core/Field/FieldItemBase.php, line 67

Class

FieldItemBase
An entity field item.

Namespace

Drupal\Core\Field

Code

public function getLangcode() {
  return $this
    ->getParent()
    ->getLangcode();
}