protected function PanelizerFieldPanelsStorage::loadEntity in Panelizer 8.5
Same name and namespace in other branches
- 8.3 src/Plugin/PanelsStorage/PanelizerFieldPanelsStorage.php \Drupal\panelizer\Plugin\PanelsStorage\PanelizerFieldPanelsStorage::loadEntity()
- 8.4 src/Plugin/PanelsStorage/PanelizerFieldPanelsStorage.php \Drupal\panelizer\Plugin\PanelsStorage\PanelizerFieldPanelsStorage::loadEntity()
Gets the underlying entity from storage.
Parameters
$id: The storage service id.
Return value
\Drupal\Core\Entity\EntityInterface|NULL
3 calls to PanelizerFieldPanelsStorage::loadEntity()
- PanelizerFieldPanelsStorage::access in src/
Plugin/ PanelsStorage/ PanelizerFieldPanelsStorage.php - PanelizerFieldPanelsStorage::load in src/
Plugin/ PanelsStorage/ PanelizerFieldPanelsStorage.php - PanelizerFieldPanelsStorage::save in src/
Plugin/ PanelsStorage/ PanelizerFieldPanelsStorage.php
File
- src/
Plugin/ PanelsStorage/ PanelizerFieldPanelsStorage.php, line 77
Class
- PanelizerFieldPanelsStorage
- Panels storage service that stores Panels displays in the Panelizer field.
Namespace
Drupal\panelizer\Plugin\PanelsStorageCode
protected function loadEntity($id) {
list($entity_type, $id, , $revision_id) = array_pad(explode(':', $id), 4, NULL);
$storage = $this->entityTypeManager
->getStorage($entity_type);
if ($revision_id) {
$entity = $storage
->loadRevision($revision_id);
}
else {
$entity = $storage
->load($id);
}
return $entity;
}