By dieterholvoet on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.1.x
Introduced in version:
10.1.0
Issue links:
Description:
A new getTitle() method is added to Drupal\link\LinkItemInterface and Drupal\link\Plugin\Field\FieldType\LinkItem. It returns the string value of the title property of the link field, or NULL if the property has no value.
$title = $entity->get('field_some_link_field')->first()->getTitle();
Classes implementing LinkItemInterface that do not extend LinkItem will need to add an implementation of this new method.
Impacts:
Module developers
Themers