You are here

function micon_menu_entity_base_field_info_alter in Micon 8

Same name and namespace in other branches
  1. 2.x micon_menu/micon_menu.module \micon_menu_entity_base_field_info_alter()

Implements hook_entity_base_field_info_alter().

File

micon_menu/micon_menu.module, line 34
Contains micon_menu.module.

Code

function micon_menu_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() === 'menu_link_content') {
    $fields['link']
      ->setDisplayOptions('form', [
      'type' => 'micon_menu',
      'weight' => -2,
      'settings' => [
        'target' => TRUE,
        'position' => TRUE,
      ],
    ]);
  }
}