public function HierarchicalTaxonomyMenuBlock::getMaxAge in Hierarchical Taxonomy Menu 8
Returns Cache Max Age.
1 call to HierarchicalTaxonomyMenuBlock::getMaxAge()
- HierarchicalTaxonomyMenuBlock::build in src/
Plugin/ Block/ HierarchicalTaxonomyMenuBlock.php - Builds and returns the renderable array for this block plugin.
File
- src/
Plugin/ Block/ HierarchicalTaxonomyMenuBlock.php, line 852
Class
- HierarchicalTaxonomyMenuBlock
- Provides a 'HierarchicalTaxonomyMenuBlock' block.
Namespace
Drupal\hierarchical_taxonomy_menu\Plugin\BlockCode
public function getMaxAge($max_age) {
if (!$max_age) {
$max_age = 0;
return $max_age;
}
if ($max_age == 'PERMANENT') {
$max_age = Cache::PERMANENT;
return $max_age;
}
else {
return $max_age;
}
}