Ejemplo n.º 1
0
 /**
  * Retrieve list of linked views
  *
  * @return array
  */
 protected function getLinkedViews()
 {
     if (!$this->linkedViews) {
         $viewList = $this->viewCollection->getViewsByStateMode(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED);
         foreach ($viewList as $view) {
             /** @var \Magento\Framework\Mview\ViewInterface $view */
             // Skip the current view
             if ($view->getId() == $this->getView()->getId()) {
                 continue;
             }
             // Search in view subscriptions
             foreach ($view->getSubscriptions() as $subscription) {
                 if ($subscription['name'] != $this->getTableName()) {
                     continue;
                 }
                 $this->linkedViews[] = $view;
             }
         }
     }
     return $this->linkedViews;
 }