Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Field / FieldItemList.php
index c2e9ada44c5e0a300729dd539f2c31ea1eca2cb9..52bf9c9d23df01eb33b411361fec96214c513071 100644 (file)
@@ -95,18 +95,6 @@ class FieldItemList extends ItemList implements FieldItemListInterface {
     return $this;
   }
 
-  /**
-   * {@inheritdoc}
-   * @todo Revisit the need when all entity types are converted to NG entities.
-   */
-  public function getValue($include_computed = FALSE) {
-    $values = [];
-    foreach ($this->list as $delta => $item) {
-      $values[$delta] = $item->getValue($include_computed);
-    }
-    return $values;
-  }
-
   /**
    * {@inheritdoc}
    */
@@ -260,7 +248,7 @@ class FieldItemList extends ItemList implements FieldItemListInterface {
    */
   public function generateSampleItems($count = 1) {
     $field_definition = $this->getFieldDefinition();
-    $field_type_class = \Drupal::service('plugin.manager.field.field_type')->getPluginClass($field_definition->getType());
+    $field_type_class = $field_definition->getItemDefinition()->getClass();
     for ($delta = 0; $delta < $count; $delta++) {
       $values[$delta] = $field_type_class::generateSampleValue($field_definition);
     }