You are here

public static function StarRatingItem::defaultFieldSettings in Star Rating 8.4

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldType/StarRatingItem.php \Drupal\starrating\Plugin\Field\FieldType\StarRatingItem::defaultFieldSettings()
  2. 8.2 src/Plugin/Field/FieldType/StarRatingItem.php \Drupal\starrating\Plugin\Field\FieldType\StarRatingItem::defaultFieldSettings()
  3. 8.3 src/Plugin/Field/FieldType/StarRatingItem.php \Drupal\starrating\Plugin\Field\FieldType\StarRatingItem::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/StarRatingItem.php, line 29

Class

StarRatingItem
Plugin implementation of the 'starrating' field type.

Namespace

Drupal\starrating\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  return [
    // Declare a single setting, 'size', with a default
    // value of 'large'.
    'max_value' => self::DEFAULT_MAX_RATING_VALUE,
  ] + parent::defaultFieldSettings();
}