public function Block::remove

Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::remove().

Overrides DisplayPluginBase::remove

File

drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php, line 188
Definition of Drupal\views\Plugin\views\display\Block. Definition of Drupal\block\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\block\Plugin\views\display

Code

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();
  }
}