public function PanelizerDefaultPanelsStorage::save in Panelizer 8.3
Same name and namespace in other branches
- 8.5 src/Plugin/PanelsStorage/PanelizerDefaultPanelsStorage.php \Drupal\panelizer\Plugin\PanelsStorage\PanelizerDefaultPanelsStorage::save()
- 8.4 src/Plugin/PanelsStorage/PanelizerDefaultPanelsStorage.php \Drupal\panelizer\Plugin\PanelsStorage\PanelizerDefaultPanelsStorage::save()
File
- src/
Plugin/ PanelsStorage/ PanelizerDefaultPanelsStorage.php, line 155
Class
- PanelizerDefaultPanelsStorage
- Panels storage service that stores Panels displays in Panelizer defaults.
Namespace
Drupal\panelizer\Plugin\PanelsStorageCode
public function save(PanelsDisplayVariant $panels_display) {
$id = $panels_display
->getStorageId();
try {
list($entity_type_id, $bundle, $view_mode, $name) = $this
->parseId($id);
$this->panelizer
->setDefaultPanelsDisplay($name, $entity_type_id, $bundle, $view_mode, $panels_display);
} catch (PanelizerException $e) {
throw new \Exception("Couldn't find Panelizer default to store Panels display");
}
}