You are here

function flexiform_entity_type_get_getters in Flexiform 7

Get the getters for a particular entity type

1 call to flexiform_entity_type_get_getters()
flexiform_manage_form_entities_form in ./flexiform.admin.inc
flexiform_manage_form_entities_form

File

./flexiform.module, line 607
Module for the Flexiform system.

Code

function flexiform_entity_type_get_getters($entity_type) {

  // If this isn't an entity type return false
  if (!entity_get_info($entity_type)) {
    return FALSE;
  }
  $getters = flexiform_entity_getter_info();
  $applicable_getters = array();
  foreach ($getters as $getter => $info) {
    if (in_array($entity_type, $info['entity_types'])) {
      $applicable_getters[$getter] = $info;
    }
  }
  return $applicable_getters;
}