public function FieldCollectionItem::label in Field collection 8.3
Same name and namespace in other branches
- 8 src/Entity/FieldCollectionItem.php \Drupal\field_collection\Entity\FieldCollectionItem::label()
Overrides \Drupal\Core\Entity\label().
Overrides ContentEntityBase::label
File
- src/
Entity/ FieldCollectionItem.php, line 84
Class
- FieldCollectionItem
- Defines the field collection item entity class.
Namespace
Drupal\field_collection\EntityCode
public function label() {
$field_label = $this
->getHost()
->getFieldDefinition($this
->bundle())
->label();
if (empty($field_label)) {
return parent::label();
}
else {
return t('@label @delta of @host', [
'@label' => $field_label,
'@delta' => $this
->getDelta(),
'@host' => $this
->getHost()
->label(),
]);
}
}