You are here

public function MenuLinkMock::getDescription in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php \Drupal\Tests\Core\Menu\MenuLinkMock::getDescription()
  2. 10 core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php \Drupal\Tests\Core\Menu\MenuLinkMock::getDescription()

Returns the description of the menu link.

Return value

string The description of the menu link.

Overrides MenuLinkInterface::getDescription

File

core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php, line 55

Class

MenuLinkMock
Defines a mock implementation of a menu link used in tests only.

Namespace

Drupal\Tests\Core\Menu

Code

public function getDescription() {
  if ($this->pluginDefinition['description']) {
    return $this->pluginDefinition['description'];
  }
  return '';
}