You are here

function fe_paths_get_fieldable_entities in File Entity Paths 7.2

Get all fieldable entities. Use to build options for form elements, or check, wether the saved entity is processable by File Entity Paths.

Return value

array An array of fieldable entities, keyed by machine name, value is the label.

3 calls to fe_paths_get_fieldable_entities()
fe_paths_entity_edit_form in ./fe_paths.admin.inc
Form builder for File Entity Paths configuration add/edit form.
fe_paths_entity_presave in ./fe_paths.module
Implements hook_file_presave().
theme_fe_paths_config_data in ./fe_paths.module

File

./fe_paths.module, line 826
Contains functions for the File Entity Paths module.

Code

function fe_paths_get_fieldable_entities() {
  $return = array();
  foreach (entity_get_info() as $name => $entity) {

    // Only works with fieldable entities.
    if ($entity['fieldable']) {
      $return[$name] = $entity['label'];
    }
  }
  return $return;
}