namespace Drupal\Core\Field\TypedData;
use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
use Drupal\Core\TypedData\DataDefinition;
/**
* by the field definitions, this class does not benefit and thus does not
* extend from MapDefinition or ComplexDataDefinitionBase.
*/
-class FieldItemDataDefinition extends DataDefinition implements ComplexDataDefinitionInterface {
+class FieldItemDataDefinition extends DataDefinition implements FieldItemDataDefinitionInterface {
/**
* The field definition the item definition belongs to.
}
/**
- * Gets the field item's field definition.
- *
- * @return \Drupal\Core\Field\FieldDefinitionInterface
- * The field definition for this field item.
+ * {@inheritdoc}
*/
public function getFieldDefinition() {
return $this->fieldDefinition;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function setFieldDefinition($field_definition) {
+ $this->fieldDefinition = $field_definition;
+ return $this;
+ }
+
}