TextLongItem.php

Same filename and directory in other branches
  1. 9 core/modules/text/src/Plugin/Field/FieldType/TextLongItem.php
  2. 8.9.x core/modules/text/src/Plugin/Field/FieldType/TextLongItem.php
  3. 10 core/modules/text/src/Plugin/Field/FieldType/TextLongItem.php

Namespace

Drupal\text\Plugin\Field\FieldType

File

core/modules/text/src/Plugin/Field/FieldType/TextLongItem.php

View source
<?php

namespace Drupal\text\Plugin\Field\FieldType;

use Drupal\Core\Field\Attribute\FieldType;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Plugin implementation of the 'text_long' field type.
 */
class TextLongItem extends TextItemBase {
    
    /**
     * {@inheritdoc}
     */
    public static function schema(FieldStorageDefinitionInterface $field_definition) {
        return [
            'columns' => [
                'value' => [
                    'type' => 'text',
                    'size' => 'big',
                ],
                'format' => [
                    'type' => 'varchar_ascii',
                    'length' => 255,
                ],
            ],
            'indexes' => [
                'format' => [
                    'format',
                ],
            ],
        ];
    }

}

Classes

Title Deprecated Summary
TextLongItem Plugin implementation of the 'text_long' field type.

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