ComputedStringLongItem.php in Computed Field 3.x
Same filename and directory in other branches
File
src/Plugin/Field/FieldType/ComputedStringLongItem.phpView source
<?php
namespace Drupal\computed_field\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
/**
* Plugin implementation of the 'computed_string' field type.
*
* @FieldType(
* id = "computed_string_long",
* label = @Translation("Computed (text, long)"),
* description = @Translation("This field defines a long text field whose value is computed by PHP-Code"),
* category = @Translation("Computed"),
* default_widget = "computed_string_widget",
* default_formatter = "computed_string"
* )
*/
class ComputedStringLongItem extends ComputedStringItemBase {
/**
* {@inheritdoc}
*/
public static function schema(FieldStorageDefinitionInterface $field_definition) {
$settings = $field_definition
->getSettings();
$schema = [
'columns' => [
'value' => [
'type' => $settings['case_sensitive'] ? 'blob' : 'text',
'size' => 'big',
],
],
];
return $schema;
}
}
Classes
Name | Description |
---|---|
ComputedStringLongItem | Plugin implementation of the 'computed_string' field type. |