protected function RevisionRevertForm::getBundleLabel in Entity API 8
Same name and namespace in other branches
- 8.0 src/Form/RevisionRevertForm.php \Drupal\entity\Form\RevisionRevertForm::getBundleLabel()
Returns a bundle label.
Parameters
\Drupal\Core\Entity\RevisionableInterface $revision: The entity revision.
Return value
string
1 call to RevisionRevertForm::getBundleLabel()
- RevisionRevertForm::submitForm in src/
Form/ RevisionRevertForm.php - Form submission handler.
File
- src/
Form/ RevisionRevertForm.php, line 168
Class
Namespace
Drupal\entity\FormCode
protected function getBundleLabel(RevisionableInterface $revision) {
/** @var \Drupal\Core\Entity\EntityInterface|\Drupal\Core\Entity\RevisionableInterface $revision */
$bundle_info = $this->bundleInformation
->getBundleInfo($revision
->getEntityTypeId());
return $bundle_info[$revision
->bundle()]['label'];
}