public function TypedData::getName in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::getName()
- 9 core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::getName()
Returns the name of a property or item.
Return value
string|int|null If the data is a property of some complex data, the name of the property. If the data is an item of a list, the name is the numeric position of the item in the list, starting with 0. Otherwise, NULL is returned.
Overrides TypedDataInterface::getName
2 calls to TypedData::getName()
- EntityReferenceItem::setValue in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php - Overrides \Drupal\Core\TypedData\TypedData::setValue().
- LayoutSectionItemList::getEntity in core/
modules/ layout_builder/ src/ Field/ LayoutSectionItemList.php - Gets the entity that field belongs to.
File
- core/
lib/ Drupal/ Core/ TypedData/ TypedData.php, line 155
Class
- TypedData
- The abstract base class for typed data.
Namespace
Drupal\Core\TypedDataCode
public function getName() {
return $this->name;
}