You are here

private function PageManagerSectionStorage::extractEntityFromRoute in Page Manager 8.4

1 call to PageManagerSectionStorage::extractEntityFromRoute()
PageManagerSectionStorage::deriveContextsFromRoute in src/Plugin/SectionStorage/PageManagerSectionStorage.php
Derives the available plugin contexts from route values.

File

src/Plugin/SectionStorage/PageManagerSectionStorage.php, line 180

Class

PageManagerSectionStorage
Defines the 'page_manager' section storage type.

Namespace

Drupal\page_manager\Plugin\SectionStorage

Code

private function extractEntityFromRoute($value, array $defaults) {
  if (!empty($value)) {
    return PageVariant::load($value);
  }
  return PageVariant::load($defaults['page_variant']);
}