Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getContexts()
 {
     // In the form, we have the page executable assigned directly.
     if ($this->page) {
         return $this->page->getContexts();
     }
     // If we are on a page manager page, return the available context.
     if (\Drupal::request()->attributes->has('page_manager_page')) {
         return \Drupal::request()->attributes->get('page_manager_page')->getContexts();
     }
     return (array) parent::getContexts();
 }