public static function Bootstrap::hasIsFrontCacheContext in Express 8
Determines if the "cache_context.url.path.is_front" service exists.
Return value
bool TRUE or FALSE
See also
\Drupal\bootstrap\Bootstrap::isFront
\Drupal\bootstrap\Bootstrap::preprocess
https://www.drupal.org/node/2829588
2 calls to Bootstrap::hasIsFrontCacheContext()
- Bootstrap::isFront in themes/
contrib/ bootstrap/ src/ Bootstrap.php - Determines if the current path is the "front" page.
- Bootstrap::preprocess in themes/
contrib/ bootstrap/ src/ Bootstrap.php - Preprocess theme hook variables.
File
- themes/
contrib/ bootstrap/ src/ Bootstrap.php, line 1022 - Contains \Drupal\bootstrap\Bootstrap.
Class
- Bootstrap
- The primary class for the Drupal Bootstrap base theme.
Namespace
Drupal\bootstrapCode
public static function hasIsFrontCacheContext() {
static $has_is_front_cache_context;
if (!isset($has_is_front_cache_context)) {
$has_is_front_cache_context = \Drupal::getContainer()
->has('cache_context.url.path.is_front');
}
return $has_is_front_cache_context;
}