Commit 8833cc0a authored by alexpott's avatar alexpott

Issue #2181549 by tstoeckler, andypost: Provide a StringLong field item with...

Issue #2181549 by tstoeckler, andypost: Provide a StringLong field item with schema type 'text' without a 'format' column.
parent 9f07ce48
<?php
/**
* @file
* Contains \Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem.
*/
namespace Drupal\Core\Field\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldDefinitionInterface;
/**
* Defines the 'string_long' field type.
*
* @FieldType(
* id = "string_long",
* label = @Translation("Long string"),
* description = @Translation("An entity field containing a long string value."),
* configurable = FALSE
* )
*/
class StringLongItem extends StringItem {
/**
* {@inheritdoc}
*/
public static function schema(FieldDefinitionInterface $field_definition) {
return array(
'columns' => array(
'value' => array(
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
'default' => '',
),
),
);
}
}
......@@ -160,7 +160,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
->setLabel(t('Link'))
->setDescription(t('The link of the feed.'));
$fields['description'] = FieldDefinition::create('string')
$fields['description'] = FieldDefinition::create('string_long')
->setLabel(t('Description'))
->setDescription(t("The parent website's description that comes from the !description element in the feed.", array('!description' => '<description>')));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment