function CommentItem::defaultFieldSettings

Same name and namespace in other branches
  1. 11.x core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php \Drupal\comment\Plugin\Field\FieldType\CommentItem::defaultFieldSettings()
  2. 10 core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php \Drupal\comment\Plugin\Field\FieldType\CommentItem::defaultFieldSettings()
  3. 9 core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php \Drupal\comment\Plugin\Field\FieldType\CommentItem::defaultFieldSettings()
  4. 8.9.x core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php \Drupal\comment\Plugin\Field\FieldType\CommentItem::defaultFieldSettings()

Overrides FieldItemBase::defaultFieldSettings

File

core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php, line 48

Class

CommentItem
Plugin implementation of the 'comment' field type.

Namespace

Drupal\comment\Plugin\Field\FieldType

Code

public static function defaultFieldSettings() {
  return [
    'default_mode' => CommentManagerInterface::COMMENT_MODE_THREADED,
    'per_page' => 50,
    'form_location' => FormLocation::Below->value,
    'anonymous' => AnonymousContact::Forbidden->value,
    'preview' => CommentPreviewMode::Optional->value,
  ] + parent::defaultFieldSettings();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.