function CommentItem::schema

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

Overrides FieldItemInterface::schema

File

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

Class

CommentItem
Plugin implementation of the 'comment' field type.

Namespace

Drupal\comment\Plugin\Field\FieldType

Code

public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
        'columns' => [
            'status' => [
                'description' => 'Whether comments are allowed on this entity: 0 = no, 1 = closed (read only), 2 = open (read/write).',
                'type' => 'int',
                'default' => 0,
            ],
        ],
        'indexes' => [],
        'foreign keys' => [],
    ];
}

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