You are here

public function Blocktabs::getCacheMaxAge in Block Tabs 8

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 EntityBase::getCacheMaxAge

File

src/Entity/Blocktabs.php, line 218

Class

Blocktabs
Defines a blocktabs configuration entity.

Namespace

Drupal\blocktabs\Entity

Code

public function getCacheMaxAge() {
  $max_age = parent::getCacheMaxAge();
  foreach ($this
    ->getTabs() as $tab) {
    $max_age = Cache::mergeMaxAges($max_age, $tab
      ->getCacheMaxAge());
  }
  return $max_age;
}