You are here

protected function LayoutBuilder::appliesTo in Core Context 8

Determines if this provider can extract contexts from the current route.

Parameters

\Symfony\Component\Routing\Route $route: The route object.

Return value

bool TRUE if this provider can extract contexts from the route, otherwise FALSE.

Overrides RouteAwareContextProviderBase::appliesTo

File

src/ContextProvider/LayoutBuilder.php, line 69

Class

LayoutBuilder
Exposes contexts available at Layout Builder routes.

Namespace

Drupal\core_context\ContextProvider

Code

protected function appliesTo(Route $route) : bool {
  $entity_type_id = $this
    ->getEntityTypeFromRoute($route);
  return isset($entity_type_id);
}