function entity_legal_get_types in Entity Legal 7
Same name and namespace in other branches
- 7.2 entity_legal.module \entity_legal_get_types()
Gets an array of all legal document types, keyed by the type name.
1 call to entity_legal_get_types()
- entity_legal_entity_info_alter in ./
entity_legal.module - Implements hook_entity_info_alter().
File
- ./
entity_legal.module, line 153 - Entity Legal module.
Code
function entity_legal_get_types($type_name = NULL) {
$types = entity_load_multiple_by_name(ENTITY_LEGAL_DOCUMENT_ENTITY_NAME, isset($type_name) ? array(
$type_name,
) : FALSE);
return isset($type_name) ? reset($types) : $types;
}