public static function MenuLinkItem::defaultFieldSettings in Menu Link (Field) 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Field/FieldType/MenuLinkItem.php \Drupal\menu_link\Plugin\Field\FieldType\MenuLinkItem::defaultFieldSettings()
Defines the field-level settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides FieldItemBase::defaultFieldSettings
File
- src/
Plugin/ Field/ FieldType/ MenuLinkItem.php, line 98
Class
- MenuLinkItem
- Defines a menu link field type which stores the link, parent and menu.
Namespace
Drupal\menu_link\Plugin\Field\FieldTypeCode
public static function defaultFieldSettings() {
$settings = parent::defaultFieldSettings();
$settings['available_menus'] = [
'main',
];
$settings['default_menu_parent'] = 'main:';
return $settings;
}