protected function GeysirParagraphDeleteForm::getParentRevisionOrParent in Geysir 8
Parameters
$parent_entity_type:
$parent_entity_revision:
Return value
\Drupal\Core\Entity\EntityInterface|null
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
3 calls to GeysirParagraphDeleteForm::getParentRevisionOrParent()
- GeysirModalParagraphDeleteForm::ajaxDelete in src/
Form/ GeysirModalParagraphDeleteForm.php - GeysirParagraphDeleteForm::getQuestion in src/
Form/ GeysirParagraphDeleteForm.php - Returns the question to ask the user.
- GeysirParagraphDeleteForm::submitForm in src/
Form/ GeysirParagraphDeleteForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
File
- src/
Form/ GeysirParagraphDeleteForm.php, line 87
Class
- GeysirParagraphDeleteForm
- Functionality to delete a paragraph.
Namespace
Drupal\geysir\FormCode
protected function getParentRevisionOrParent($parent_entity_type, $parent_entity_revision) {
$entity_storage = $this->entityTypeManager
->getStorage($parent_entity_type);
if ($this->entityTypeManager
->getDefinition($parent_entity_type)
->isRevisionable()) {
return $entity_storage
->loadRevision($parent_entity_revision);
}
else {
return $entity_storage
->load($parent_entity_revision);
}
}