Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Field / TypedData / FieldItemDataDefinition.php
index 4a6d8775b19a5e802c7b4a66d02b9bed9d04ad5d..bc8f9c0a2b9ccb167376bd47f3166ef3c04d4113 100644 (file)
@@ -3,7 +3,6 @@
 namespace Drupal\Core\Field\TypedData;
 
 use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
 use Drupal\Core\TypedData\DataDefinition;
 
 /**
@@ -14,7 +13,7 @@ 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.
@@ -74,13 +73,18 @@ class FieldItemDataDefinition extends DataDefinition implements ComplexDataDefin
   }
 
   /**
-   * 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;
+  }
+
 }