public function Panelizer::getDefaultPanelsDisplayByMachineName in Panelizer 8.5
Same name and namespace in other branches
- 8.3 src/Panelizer.php \Drupal\panelizer\Panelizer::getDefaultPanelsDisplayByMachineName()
- 8.4 src/Panelizer.php \Drupal\panelizer\Panelizer::getDefaultPanelsDisplayByMachineName()
Load a Panels Display via an ID (Machine Name).
Return value
\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant|NULL The default Panels display with the given name if it exists; otherwise NULL.
File
- src/
Panelizer.php, line 151
Class
- Panelizer
- The Panelizer service.
Namespace
Drupal\panelizerCode
public function getDefaultPanelsDisplayByMachineName($full_machine_name) {
list($entity_type, $bundle, $view_mode, $machine_name) = explode('__', $full_machine_name);
/** @var \Drupal\panelizer\Panelizer $panelizer */
// @todo this $display_id looks all wrong to me since it's the name and view_mode.
return $this
->getDefaultPanelsDisplay($machine_name, $entity_type, $bundle, $view_mode);
}