Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drupal / drupal-driver / src / Drupal / Driver / Fields / Drupal7 / ListTextHandler.php
diff --git a/vendor/drupal/drupal-driver/src/Drupal/Driver/Fields/Drupal7/ListTextHandler.php b/vendor/drupal/drupal-driver/src/Drupal/Driver/Fields/Drupal7/ListTextHandler.php
deleted file mode 100644 (file)
index 25b5f35..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-namespace Drupal\Driver\Fields\Drupal7;
-
-/**
- * ListText field handler for Drupal 7.
- */
-class ListTextHandler extends AbstractHandler {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function expand($values) {
-    $return = array();
-    if (!empty($this->fieldInfo['settings']['allowed_values_function'])) {
-      $cacheable = TRUE;
-      $callback = $this->fieldInfo['settings']['allowed_values_function'];
-      $allowed_values = call_user_func($callback, $this->fieldInfo, $this, $this->entityType, $this->entity, $cacheable);
-    }
-    else {
-      $allowed_values = array();
-      $options = array_flip($this->fieldInfo['settings']['allowed_values']);
-      foreach ($values as $value) {
-        if (array_key_exists($value, $options)) {
-          $allowed_values[$value] = $options[$value];
-        }
-        else {
-          $allowed_values[$value] = $value;
-        }
-      }
-    }
-    foreach ($values as $value) {
-      $return[$this->language][] = array('value' => $allowed_values[$value]);
-    }
-    return $return;
-  }
-
-}