Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drupal / drupal-driver / src / Drupal / Driver / Fields / Drupal6 / TaxonomyHandler.php
diff --git a/vendor/drupal/drupal-driver/src/Drupal/Driver/Fields/Drupal6/TaxonomyHandler.php b/vendor/drupal/drupal-driver/src/Drupal/Driver/Fields/Drupal6/TaxonomyHandler.php
deleted file mode 100644 (file)
index 8fbac6f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace Drupal\Driver\Fields\Drupal6;
-
-use Drupal\Driver\Fields\FieldHandlerInterface;
-
-/**
- * Provides a custom field handler to make it easier to include taxonomy terms.
- */
-class TaxonomyHandler implements FieldHandlerInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function expand($values) {
-    $result = array();
-    $values = (array) $values;
-    foreach ($values as $entry) {
-      $terms = explode(',', $entry);
-      foreach ($terms as $term) {
-        // Try to split things out in order to find optional specified vocabs.
-        $term_name_or_tid = '';
-        $parts = explode(':', $term);
-        if (count($parts) == 1) {
-          $term_name_or_tid = $term;
-        }
-        elseif (count($parts) == 2) {
-          $term_name_or_tid = $term;
-        }
-        if ($term_list = taxonomy_get_term_by_name($term_name_or_tid)) {
-          $term = reset($term_list);
-          $result[] = $term;
-        }
-      }
-    }
-
-    return $result;
-  }
-
-}