You are here

function hook_gin_lb_is_layout_builder_route_alter in Gin Layout Builder 1.0.x

Helps to detect if a route is a layout builder route.

Parameters

boolean $gin_lb_is_layout_builder_route: Boolean flag.

1 invocation of hook_gin_lb_is_layout_builder_route_alter()
gin_lb_is_layout_builder_route in ./gin_lb.module
Returns true if the current route is a layout builder route.

File

./gin_lb.api.php, line 36
Hooks for the gin_lb module.

Code

function hook_gin_lb_is_layout_builder_route_alter(&$gin_lb_is_layout_builder_route) {
  $route_match = \Drupal::routeMatch();
  $route_name = $route_match
    ->getRouteName();
  if ($route_name === 'entity.page.add_step_form' && $route_match
    ->getParameter('step') === 'layout_builder') {
    $gin_lb_is_layout_builder_route = TRUE;
  }
}