You are here

public function MenuLinkEntity::getDescription in Admin Toolbar 8.2

Same name and namespace in other branches
  1. 3.x admin_toolbar_tools/src/Plugin/Menu/MenuLinkEntity.php \Drupal\admin_toolbar_tools\Plugin\Menu\MenuLinkEntity::getDescription()

Returns the description of the menu link.

Return value

string The description of the menu link.

Overrides MenuLinkDefault::getDescription

File

admin_toolbar_tools/src/Plugin/Menu/MenuLinkEntity.php, line 69

Class

MenuLinkEntity
Provides a menu link plugins for configuration entities.

Namespace

Drupal\admin_toolbar_tools\Plugin\Menu

Code

public function getDescription() {

  // @todo Remove node_type special handling.
  if ($this->entity instanceof EntityDescriptionInterface || $this->entity instanceof NodeTypeInterface) {
    return $this->entity
      ->getDescription();
  }
  return parent::getDescription();
}