public function WishlistItem::getTitle in Commerce Wishlist 8.3
Gets the wishlist item title.
Return value
string The wishlist item title
Overrides WishlistItemInterface::getTitle
1 call to WishlistItem::getTitle()
- WishlistItem::label in src/
Entity/ WishlistItem.php - Gets the label of the entity.
File
- src/
Entity/ WishlistItem.php, line 119
Class
- WishlistItem
- Defines the wishlist item entity class.
Namespace
Drupal\commerce_wishlist\EntityCode
public function getTitle() {
$purchasable_entity = $this
->getPurchasableEntity();
if ($purchasable_entity) {
return $purchasable_entity
->label();
}
else {
return $this
->t('This item is no longer available');
}
}