function entity_block_get_entity_types in Entity Blocks 7
Returns an array of entity types.
Return value
array
2 calls to entity_block_get_entity_types()
- entity_block_form in ./
entity_block.module - Returns the form for adding an entity block.
- entity_block_get_entity_types_options in ./
entity_block.module - Returns an #options ready array.
File
- ./
entity_block.module, line 501 - Display entities (via view modes) as fieldable blocks.
Code
function entity_block_get_entity_types() {
$entity_types = array();
$entity_info = entity_get_info();
$blacklisted_view_modes = entity_block_get_blacklisted_view_modes();
foreach ($entity_info as $entity_type => $info) {
// Filter out entity types with blacklisted-only view modes.
if (count(array_diff(array_keys($info['view modes']), $blacklisted_view_modes))) {
$entity_types[$entity_type] = $info;
}
}
return $entity_types;
}