You are here

public static function EntityReferenceHierarchy::defaultFieldSettings in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/EntityReferenceHierarchy.php \Drupal\entity_hierarchy\Plugin\Field\FieldType\EntityReferenceHierarchy::defaultFieldSettings()

Defines the field-level settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides EntityReferenceItem::defaultFieldSettings

File

src/Plugin/Field/FieldType/EntityReferenceHierarchy.php, line 74

Class

EntityReferenceHierarchy
Plugin implementation of the 'entity_reference_hierarchy' field type.

Namespace

Drupal\entity_hierarchy\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  return [
    'weight_label' => t('Weight'),
    'weight_min' => self::HIERARCHY_MIN_CHILD_WEIGHT,
    'weight_max' => self::HIERARCHY_MAX_CHILD_WEIGHT,
  ] + parent::defaultFieldSettings();
}