public function Panelizer::isPanelized in Panelizer 8.3
Same name and namespace in other branches
- 8.5 src/Panelizer.php \Drupal\panelizer\Panelizer::isPanelized()
- 8.4 src/Panelizer.php \Drupal\panelizer\Panelizer::isPanelized()
Checks if the given entity type, bundle and view mode are panelized.
Parameters
string $entity_type_id: The entity type id.
string $bundle: The bundle.
string $view_mode: The view mode.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface|NULL $display: If the caller already has the correct display, it can optionally be passed in here so the Panelizer service doesn't have to look it up; otherwise, this argument can bo omitted.
Return value
bool TRUE if panelized; otherwise FALSE.
Overrides PanelizerInterface::isPanelized
2 calls to Panelizer::isPanelized()
- Panelizer::getPanelizerSettings in src/
Panelizer.php - Get the Panelizer settings for an entity type, bundle and view mode.
- Panelizer::hasDefaultPermission in src/
Panelizer.php - Checks if a user has permission to perform an operation on a default.
File
- src/
Panelizer.php, line 453
Class
- Panelizer
- The Panelizer service.
Namespace
Drupal\panelizerCode
public function isPanelized($entity_type_id, $bundle, $view_mode, EntityViewDisplayInterface $display = NULL) {
if (!$this
->getEntityPlugin($entity_type_id)) {
return FALSE;
}
if (!$display) {
$display = $this
->getEntityViewDisplay($entity_type_id, $bundle, $view_mode);
}
return $display
->getThirdPartySetting('panelizer', 'enable', FALSE);
}