You are here

public function FlexiformFormEntityBase::checkBundle in Flexiform 7

Check bundle.

Parameters

$entity: The entity to check.

Return value

boolean True if the entity is the right bundle for this form entity. False otherwise.

4 calls to FlexiformFormEntityBase::checkBundle()
FlexiformFormEntityEntityReference::getEntity in includes/form_entity/entityreference.form_entity.inc
Get the entity for the form.
FlexiformFormEntityLoad::getEntity in includes/form_entity/load.form_entity.inc
Get the entity for the form.
FlexiformFormEntityNew::getEntity in includes/form_entity/new.form_entity.inc
Get the entity for the form.
FlexiformFormEntityNewCommerceLineItem::getEntity in includes/form_entity/commerce_line_item.form_entity.inc
Get the entity for the form.

File

includes/form_entity/base.form_entity.inc, line 92
Contains class for a basic entity getter.

Class

FlexiformFormEntityBase
Default Form Entity Class for Managing a form Entity.

Code

public function checkBundle($entity) {
  list(, , $bundle) = entity_extract_ids($this->entity_type, $entity);
  if ($bundle == $this->settings['bundle']) {
    return TRUE;
  }
  return FALSE;
}