diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php
index 0a1fb76..23362f0 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsHandlerManager.php
@@ -9,9 +9,11 @@
 
 use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Component\Plugin\PluginManagerBase;
+use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\Factory\ContainerFactory;
 use Drupal\Core\Plugin\Discovery\CacheDecorator;
 use Drupal\views\Plugin\Discovery\ViewsHandlerDiscovery;
+use Drupal\views\Plugin\views\HandlerBase;
 use Drupal\views\ViewsData;
 
 /**
@@ -36,6 +38,13 @@ class ViewsHandlerManager extends PluginManagerBase {
   protected $handlerType;
 
   /**
+   * The module handler.
+   *
+   * @param \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected $moduleHandler;
+
+  /**
    * Constructs a ViewsHandlerManager object.
    *
    * @param string $handler_type
@@ -44,9 +53,11 @@ class ViewsHandlerManager extends PluginManagerBase {
    *   An object that implements \Traversable which contains the root paths
    *   keyed by the corresponding namespace to look for plugin implementations,
    * @param \Drupal\views\ViewsData $views_data
-    *   The views data cache.
+   *   The views data cache.
+   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
+   *   The module handler.
    */
-  public function __construct($handler_type, \Traversable $namespaces, ViewsData $views_data) {
+  public function __construct($handler_type, \Traversable $namespaces, ViewsData $views_data, ModuleHandlerInterface $module_handler) {
     $this->discovery = new ViewsHandlerDiscovery($handler_type, $namespaces);
     $this->discovery = new CacheDecorator($this->discovery, "views:$handler_type", 'views_info');
 
@@ -54,6 +65,7 @@ public function __construct($handler_type, \Traversable $namespaces, ViewsData $
 
     $this->viewsData = $views_data;
     $this->handlerType = $handler_type;
+    $this->moduleHandler = $module_handler;
   }
 
 
@@ -121,4 +133,14 @@ public function getHandler($item, $override = NULL) {
     return $this->createInstance('broken', array('optional' => $optional, 'original_configuration' => $item));
   }
 
+  public function createInstance($plugin_id, array $configuration = array()) {
+    $instance = parent::createInstance($plugin_id, $configuration);
+    if ($instance instanceof HandlerBase) {
+      $instance->setModuleHandler($this->moduleHandler);
+      $instance->setViewsData($this->viewsData);
+    }
+    return $instance;
+  }
+
+
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
index 24ae8f7..29481db 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
@@ -11,16 +11,33 @@
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\Url;
 use Drupal\Component\Utility\Xss;
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\Render\Element;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\Plugin\views\PluginBase;
 use Drupal\views\ViewExecutable;
 use Drupal\Core\Database\Database;
 use Drupal\views\Views;
+use Drupal\views\ViewsData;
 
 abstract class HandlerBase extends PluginBase {
 
   /**
+   * The module handler.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected $moduleHandler;
+
+  /**
+   * The views data service.
+   *
+   * @var \Drupal\views\ViewsData
+   */
+  protected $viewsData;
+
+  /**
    * Where the $query object will reside:
    *
    * @var \Drupal\views\Plugin\views\query\QueryPluginBase
@@ -173,7 +190,7 @@ public function adminLabel($short = FALSE) {
       return $title;
     }
     $title = ($short && isset($this->definition['title short'])) ? $this->definition['title short'] : $this->definition['title'];
-    return t('!group: !title', array('!group' => $this->definition['group'], '!title' => $title));
+    return $this->t('!group: !title', array('!group' => $this->definition['group'], '!title' => $title));
   }
 
   /**
@@ -259,11 +276,11 @@ protected function caseTransform($string, $option) {
       default:
         return $string;
       case 'upper':
-        return drupal_strtoupper($string);
+        return Unicode::strtoupper($string);
       case 'lower':
-        return drupal_strtolower($string);
+        return Unicode::strtolower($string);
       case 'ucfirst':
-        return drupal_strtoupper(drupal_substr($string, 0, 1)) . drupal_substr($string, 1);
+        return Unicode::strtoupper(Unicode::substr($string, 0, 1)) . Unicode::substr($string, 1);
       case 'ucwords':
         if (Unicode::getStatus() == Unicode::STATUS_MULTIBYTE) {
           return mb_convert_case($string, MB_CASE_TITLE);
@@ -298,8 +315,8 @@ public function buildOptionsForm(&$form, &$form_state) {
     );
     $form['admin_label']['admin_label'] = array(
       '#type' => 'textfield',
-      '#title' => t('Administrative title'),
-      '#description' => t('This title will be displayed on the views edit page instead of the default one. This might be useful if you have the same item twice.'),
+      '#title' => $this->t('Administrative title'),
+      '#description' => $this->t('This title will be displayed on the views edit page instead of the default one. This might be useful if you have the same item twice.'),
       '#default_value' => $this->options['admin_label'],
       '#parents' => array('options', 'admin_label'),
     );
@@ -313,7 +330,30 @@ public function buildOptionsForm(&$form, &$form_state) {
     );
     // Allow to alter the default values brought into the form.
     // @todo Do we really want to keep this hook.
-    \Drupal::moduleHandler()->alter('views_handler_options', $this->options, $this->view);
+    $this->getModuleHandler()->alter('views_handler_options', $this->options, $this->view);
+  }
+
+  /**
+   * Gets the module handler.
+   *
+   * @return \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected function getModuleHandler() {
+    if (!$this->moduleHandler) {
+      $this->moduleHandler = \Drupal::moduleHandler();
+    }
+
+    return $this->moduleHandler;
+  }
+
+  /**
+   * Sets the module handler.
+   *
+   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
+   *   The module handler.
+   */
+  public function setModuleHandler(ModuleHandlerInterface $module_handler) {
+    $this->moduleHandler = $module_handler;
   }
 
   /**
@@ -340,9 +380,9 @@ public function buildGroupByForm(&$form, &$form_state) {
 
     $form['group_type'] = array(
       '#type' => 'select',
-      '#title' => t('Aggregation type'),
+      '#title' => $this->t('Aggregation type'),
       '#default_value' => $this->options['group_type'],
-      '#description' => t('Select the aggregation function to use on this field.'),
+      '#description' => $this->t('Select the aggregation function to use on this field.'),
       '#options' => $group_types,
     );
   }
@@ -449,7 +489,7 @@ public function showExposeForm(&$form, &$form_state) {
     // these defaults from getting wiped out. This setting will only be TRUE
     // during a 2nd pass rerender.
     if (!empty($form_state['force_expose_options'])) {
-      foreach (element_children($form['expose']) as $id) {
+      foreach (Element::children($form['expose']) as $id) {
         if (isset($form['expose'][$id]['#default_value']) && !isset($form['expose'][$id]['#value'])) {
           $form['expose'][$id]['#value'] = $form['expose'][$id]['#default_value'];
         }
@@ -654,6 +694,29 @@ public function getDateField() {
   }
 
   /**
+   * Gets views data service.
+   *
+   * @return \Drupal\views\ViewsData
+   */
+  protected function getViewsData() {
+    if (!$this->viewsData) {
+      $this->viewsData = Views::viewsData();
+    }
+
+    return $this->viewsData;
+  }
+
+  /**
+   * Sets the views data service.
+   *
+   * @param \Drupal\views\ViewsData $views_data
+   *   The views data.
+   */
+  public function setViewsData(ViewsData $views_data) {
+    $this->viewsData = $views_data;
+  }
+
+  /**
    * Fetches a handler to join one table to a primary table from the data cache.
    *
    * @param string $table
@@ -709,10 +772,10 @@ public function getEntityType() {
     // If the user has configured a relationship on the handler take that into
     // account.
     if (!empty($this->options['relationship']) && $this->options['relationship'] != 'none') {
-      $views_data = Views::viewsData()->get($this->view->relationship->table);
+      $views_data = $this->getViewsData()->get($this->view->relationship->table);
     }
     else {
-      $views_data = Views::viewsData()->get($this->view->storage->get('base_table'));
+      $views_data = $this->getViewsData()->get($this->view->storage->get('base_table'));
     }
 
     if (isset($views_data['table']['entity type'])) {
diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml
index 30aa96a..507788c 100644
--- a/core/modules/views/views.services.yml
+++ b/core/modules/views/views.services.yml
@@ -4,10 +4,10 @@ services:
     arguments: [access, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
   plugin.manager.views.area:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [area, '@container.namespaces', '@views.views_data']
+    arguments: [area, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.argument:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [argument, '@container.namespaces', '@views.views_data']
+    arguments: [argument, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.argument_default:
     class: Drupal\views\Plugin\ViewsPluginManager
     arguments: [argument_default, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
@@ -28,13 +28,13 @@ services:
     arguments: [exposed_form, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
   plugin.manager.views.field:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [field, '@container.namespaces', '@views.views_data']
+    arguments: [field, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.filter:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [filter, '@container.namespaces', '@views.views_data']
+    arguments: [filter, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.join:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [join, '@container.namespaces', '@views.views_data']
+    arguments: [join, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.pager:
     class: Drupal\views\Plugin\ViewsPluginManager
     arguments: [pager, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
@@ -43,13 +43,13 @@ services:
     arguments: [query, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
   plugin.manager.views.relationship:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [relationship, '@container.namespaces', '@views.views_data']
+    arguments: [relationship, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.row:
     class: Drupal\views\Plugin\ViewsPluginManager
     arguments: [row, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
   plugin.manager.views.sort:
     class: Drupal\views\Plugin\ViewsHandlerManager
-    arguments: [sort, '@container.namespaces', '@views.views_data']
+    arguments: [sort, '@container.namespaces', '@views.views_data', '@module_handler']
   plugin.manager.views.style:
     class: Drupal\views\Plugin\ViewsPluginManager
     arguments: [style, '@container.namespaces', '@cache.views_info', '@language_manager', '@module_handler']
