You are here

public function MenuLinkConfig::getPluginDefinition in Config menu link 8

Overrides MenuLinkConfigInterface::getPluginDefinition

1 call to MenuLinkConfig::getPluginDefinition()
MenuLinkConfig::postSave in src/Entity/MenuLinkConfig.php
Acts on a saved entity before the insert or update hook is invoked.

File

src/Entity/MenuLinkConfig.php, line 96
Contains \Drupal\menu_link_config\Entity\MenuLinkConfig.

Class

MenuLinkConfig
Defines the menu link config entity.

Namespace

Drupal\menu_link_config\Entity

Code

public function getPluginDefinition() {
  $plugin_definition = [];
  $plugin_definition['title'] = $this
    ->getTitle();
  $plugin_definition['description'] = $this
    ->getDescription();
  $plugin_definition['route_name'] = $this
    ->getRouteName();
  $plugin_definition['route_parameters'] = $this
    ->getRouteParameters();
  $plugin_definition['options'] = $this
    ->getOptions();
  $plugin_definition['menu_name'] = $this
    ->getMenuName();
  $plugin_definition['parent'] = $this
    ->getParent();
  $plugin_definition['enabled'] = $this
    ->isEnabled() ? 1 : 0;
  $plugin_definition['weight'] = $this
    ->getWeight();
  $plugin_definition['metadata']['entity_id'] = $this
    ->id();
  $plugin_definition['class'] = 'Drupal\\menu_link_config\\Plugin\\Menu\\MenuLinkConfig';
  $plugin_definition['form_class'] = 'Drupal\\menu_link_config\\Plugin\\Menu\\Form\\MenuLinkConfigForm';
  return $plugin_definition;
}