function MenuLinkMock::getCacheMaxAge

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

Overrides MenuLinkBase::getCacheMaxAge

File

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

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

public function getCacheMaxAge() {
    return $this->pluginDefinition['metadata']['cache_max_age'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.