function PathPluginBase::postSaveView
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ PathPluginBase.php, line 575
Class
- PathPluginBase
- The base display plugin for path/callbacks. This is used for pages and feeds.
Namespace
Drupal\views\Plugin\views\displayCode
public function postSaveView(PostSaveProcess $postSaveProcess, ?DisplayPluginInterface $original_display = NULL) : void {
if ($postSaveProcess->needsRouterRebuild()) {
return;
}
// An empty original display means a new view, we need a router rebuild.
if (!$original_display) {
$postSaveProcess->setRouterRebuild();
return;
}
// Rebuild the router when the enclosing view status has changed.
if ($this->view->storage
->status() != $original_display->view->storage
->status()) {
$postSaveProcess->setRouterRebuild();
return;
}
// Rebuild if at least one of the route-affecting options has changed.
foreach ($this->getRouteAffectingOptions() as $option) {
if ($this->getOption($option) != $original_display->getOption($option)) {
$postSaveProcess->setRouterRebuild();
return;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.