protected function FlexiformFormEntityBase::checkBundle in Flexiform 8
Check whether a given entity matches bundle required.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to check the bundle on.
Return value
bool Whether the bundle matches the expected.
1 call to FlexiformFormEntityBase::checkBundle()
- FlexiformFormEntityLoad::getEntity in src/
Plugin/ FlexiformFormEntity/ FlexiformFormEntityLoad.php - Get the Entity.
File
- src/
FormEntity/ FlexiformFormEntityBase.php, line 72
Class
- FlexiformFormEntityBase
- Provides the base form entity plugin.
Namespace
Drupal\flexiform\FormEntityCode
protected function checkBundle(EntityInterface $entity) {
return !$entity
->getEntityType()
->hasKey('bundle') || $entity
->bundle() == $this
->getBundle();
}