You are here

public function MenuLinkContentService::installViewModeField in Menu Item Extras 8.2

File

src/Service/MenuLinkContentService.php, line 97

Class

MenuLinkContentService
Class MenuLinkContentHelper.

Namespace

Drupal\menu_item_extras\Service

Code

public function installViewModeField() {
  $definition = $this->entityFieldManager
    ->getFieldStorageDefinitions('menu_link_content')['view_mode'];
  $this->fieldStorageDefinitionListener
    ->onFieldStorageDefinitionCreate($definition);
}