Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / text / src / Plugin / Field / FieldType / TextLongItem.php
1 <?php
2
3 namespace Drupal\text\Plugin\Field\FieldType;
4
5 use Drupal\Core\Field\FieldStorageDefinitionInterface;
6
7 /**
8  * Plugin implementation of the 'text_long' field type.
9  *
10  * @FieldType(
11  *   id = "text_long",
12  *   label = @Translation("Text (formatted, long)"),
13  *   description = @Translation("This field stores a long text with a text format."),
14  *   category = @Translation("Text"),
15  *   default_widget = "text_textarea",
16  *   default_formatter = "text_default"
17  * )
18  */
19 class TextLongItem extends TextItemBase {
20
21   /**
22    * {@inheritdoc}
23    */
24   public static function schema(FieldStorageDefinitionInterface $field_definition) {
25     return [
26       'columns' => [
27         'value' => [
28           'type' => 'text',
29           'size' => 'big',
30         ],
31         'format' => [
32           'type' => 'varchar_ascii',
33           'length' => 255,
34         ],
35       ],
36       'indexes' => [
37         'format' => ['format'],
38       ],
39     ];
40   }
41
42 }