You are here

public function MenuLinkMock::getCacheMaxAge in Drupal 10

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

The maximum age for which this object may be cached.

Return value

int The maximum time in seconds that this object may be cached.

Overrides MenuLinkBase::getCacheMaxAge

File

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

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'];
}