FacebookComments.php in Facebook Comments Social Plugin 8
File
src/Plugin/Field/FieldType/FacebookComments.php
View source
<?php
namespace Drupal\facebook_comments\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldItemBase;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\TypedData\DataDefinition;
class FacebookComments extends FieldItemBase {
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return array(
'columns' => array(
'value' => array(
'type' => 'text',
'size' => 'tiny',
'not null' => FALSE,
),
),
);
}
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('string');
return $properties;
}
}