You are here

function entityreference_crumbs_plugins in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 7 plugins/crumbs.entityreference.inc \entityreference_crumbs_plugins()

Implements hook_crumbs_plugins().

Parameters

crumbs_InjectedAPI_hookCrumbsPlugins $api:

File

plugins/crumbs.entityreference.inc, line 8

Code

function entityreference_crumbs_plugins($api) {
  foreach (field_info_fields() as $field_name => $field_info) {
    if (1 && 'entityreference' === $field_info['type'] && '1' === '' . $field_info['cardinality']) {
      $plugin = new crumbs_EntityPlugin_Field_EntityReference($field_name, $field_info['bundles']);
      $api
        ->entityParentPlugin($field_name, $plugin, array_keys($field_info['bundles']));
    }
  }
  $api
    ->disabledByDefault('*');
}