You are here

function custom_breadcrumbs_entity_extra_field_info in Custom Breadcrumbs 1.x

Implements hook_entity_extra_field_info().

File

./custom_breadcrumbs.module, line 45
Primary module hooks for Custom breadcrumbs module.

Code

function custom_breadcrumbs_entity_extra_field_info() {
  $extra = [];
  $entity_types = \Drupal::entityTypeManager()
    ->getDefinitions();
  $entityBundleInfo = \Drupal::service('entity_type.bundle.info');
  foreach ($entity_types as $key => $type) {
    foreach ($entityBundleInfo
      ->getBundleInfo($key) as $bundle_key => $bundle_name) {
      $extra[$key][$bundle_key]['display']['breadcrumbs'] = [
        'label' => t('Breadcrumbs'),
        'description' => t('Breadcrumbs'),
        'weight' => 100,
        'visible' => FALSE,
      ];
    }
  }
  return $extra;
}