예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function remove()
 {
     parent::remove();
     if ($this->entityManager->hasDefinition('block')) {
         $plugin_id = 'views_block:' . $this->view->storage->id() . '-' . $this->display['id'];
         foreach ($this->entityManager->getStorage('block')->loadByProperties(['plugin' => $plugin_id]) as $block) {
             $block->delete();
         }
     }
 }
예제 #2
0
 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::remove().
  */
 public function remove()
 {
     parent::remove();
     $plugin_id = 'views_block:' . $this->view->storage->id() . '-' . $this->display['id'];
     foreach (entity_load_multiple_by_properties('block', array('plugin' => $plugin_id)) as $block) {
         $block->delete();
     }
 }