public function PanelizerInterface::setPanelsDisplay in Panelizer 8.5
Same name and namespace in other branches
- 8.3 src/PanelizerInterface.php \Drupal\panelizer\PanelizerInterface::setPanelsDisplay()
- 8.4 src/PanelizerInterface.php \Drupal\panelizer\PanelizerInterface::setPanelsDisplay()
Sets the Panels display for a given entity and view mode.
Parameters
\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity.
string $view_mode: The entity view mode.
string|NULL $default: The name of the default if setting to a default; otherwise NULL.
\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant|NULL $panels_display: The Panels display if this is an override; otherwise NULL.
Throws
\Drupal\panelizer\Exception\PanelizerException When custom overrides aren't enabled on this entity, bundle and view mode.
1 method overrides PanelizerInterface::setPanelsDisplay()
- Panelizer::setPanelsDisplay in src/
Panelizer.php - Sets the Panels display for a given entity and view mode.
File
- src/
PanelizerInterface.php, line 64
Class
- PanelizerInterface
- Interface for the Panelizer service.
Namespace
Drupal\panelizerCode
public function setPanelsDisplay(FieldableEntityInterface $entity, $view_mode, $default, PanelsDisplayVariant $panels_display = NULL);