You are here

public static function CmisField::propertyDefinitions in CMIS API 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/CmisField.php \Drupal\cmis\Plugin\Field\FieldType\CmisField::propertyDefinitions()
  2. 3.0.x src/Plugin/Field/FieldType/CmisField.php \Drupal\cmis\Plugin\Field\FieldType\CmisField::propertyDefinitions()

Defines field item properties.

Properties that are required to constitute a valid, non-empty item should be denoted with \Drupal\Core\TypedData\DataDefinition::setRequired().

Return value

\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.

Overrides FieldItemInterface::propertyDefinitions

See also

\Drupal\Core\Field\BaseFieldDefinition

File

src/Plugin/Field/FieldType/CmisField.php, line 56

Class

CmisField
Plugin implementation of the 'cmis_field' field type.

Namespace

Drupal\cmis\Plugin\Field\FieldType

Code

public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {

  // Add our properties.
  $properties['title'] = DataDefinition::create('string')
    ->setLabel(t('Title'))
    ->setDescription(t('The title of CMIS object.'));
  $properties['path'] = DataDefinition::create('string')
    ->setLabel(t('Path'))
    ->setDescription(t('The path of CMIS object.'));
  return $properties;
}