You are here

public static function MenuLinkContentVisibilityWidget::create in Custom Menu Links Visibility 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldWidget/MenuLinkContentVisibilityWidget.php \Drupal\menu_link_content_visibility\Plugin\Field\FieldWidget\MenuLinkContentVisibilityWidget::create()

@inheritDoc

Overrides WidgetBase::create

File

src/Plugin/Field/FieldWidget/MenuLinkContentVisibilityWidget.php, line 29

Class

MenuLinkContentVisibilityWidget
Plugin annotation @FieldWidget( label = @Translation("Menu link visibility"), id = "menu_link_content_visibility", field_types = { "menu_link_content_visibility" }, )

Namespace

Drupal\menu_link_content_visibility\Plugin\Field\FieldWidget

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['third_party_settings'], $container
    ->get('plugin.manager.condition'), $container
    ->get('context.repository'));
}