You are here

function fc_entity_types in Field Complete 7

Return all entity_types that can benefit from Field Complete

5 calls to fc_entity_types()
fc_rebuild in ./fc.admin.inc
fc_rebuild_submit in ./fc.admin.inc
fc_settings in ./fc.admin.inc
@file Field Complete - Provides field-based completeness for any entity - admin.
_fc_incomplete_block_info in fc_incomplete/fc_incomplete.registry.inc
Implements hook_block_info().
_fc_progress_block_info in fc_progress/fc_progress.registry.inc
Implements hook_block_info().
4 string references to 'fc_entity_types'
fc_enabled_entity_types in ./fc.module
Returns the list of enabled entity types
fc_install in ./fc.install
Implements hook_install().
fc_settings in ./fc.admin.inc
@file Field Complete - Provides field-based completeness for any entity - admin.
fc_uninstall in ./fc.install
Implements hook_uninstall().

File

./fc.module, line 419
Field Complete - Provides field-based completeness for any entity.

Code

function fc_entity_types() {
  static $entity_types = array();
  foreach (entity_get_info() as $entity_type => $entity_info) {
    if (empty($entity_info['uri callback']) || empty($entity_info['fieldable'])) {

      // There's no display URI for this entity so it'll never appear
      // rendered, or it's not fieldable so Field Complete doesn't apply
      continue;
    }
    $entity_types[$entity_type] = $entity_info;
  }
  return $entity_types;
}