function Block::postSaveView
Acts on a saved view.
Parameters
\Drupal\views\PostSaveProcess $postSaveProcess: The views save context. Plugins flag work here instead of performing it directly, so it happens at most once per view save. For example, the block plugin queues the block plugin manager via ::addDiscoveryToClear() even if more than one block display changed.
\Drupal\views\Plugin\views\display\DisplayPluginInterface|null $original_display: (optional) The original display. Empty when saving a new view.
Overrides PostSaveViewInterface::postSaveView
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ Block.php, line 393
Class
- Block
- The plugin that handles a block.
Namespace
Drupal\views\Plugin\views\displayCode
public function postSaveView(PostSaveProcess $postSaveProcess, ?DisplayPluginInterface $original_display = NULL) : void {
if ($this->blockManager instanceof CachedDiscoveryInterface) {
$postSaveProcess->addDiscoveryToClear($this->blockManager);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.