You are here

function link_attributes_entity_base_field_info_alter in Link Attributes widget 8

Implements hook_entity_base_field_info_alter().

File

./link_attributes.module, line 14
Contains main module functions.

Code

function link_attributes_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() === 'menu_link_content') {
    $fields['link']
      ->setDisplayOptions('form', [
      'type' => 'link_attributes',
      'weight' => -2,
    ]);
  }
}