You are here

function entityform_block_exists in Entityform block 7

Helper function to determine if the block is enabled for a given entity form type.

Parameters

$types: Array of enabled blocks for entityform types.

$type: Entityform type machine name used as a block delta. *

Return value

True if the block is enabled for the given entityform type, False if not.

6 calls to entityform_block_exists()
EntityFormBlockTestCase::addEntityFormBlock in ./entityform_block.test
EntityFormBlockTestCase::disableEntityFormBlock in ./entityform_block.test
entityform_block_block_view in ./entityform_block.module
Implements hook_block_view().
entityform_block_entity_delete in ./entityform_block.module
Implements hook_entity_type_delete().
entityform_block_form_alter in ./entityform_block.module
Implements hook_form_alter().

... See full list

File

./entityform_block.module, line 148
Render any entity form into a block.

Code

function entityform_block_exists($types, $type) {
  if (in_array($type, $types)) {
    return TRUE;
  }
}