Commit 8bd23e4b authored by webchick's avatar webchick

Issue #2065393 by dlu: Find 'use Drupal' and replace with inline references to \Drupal.

parent e552920f
......@@ -7,7 +7,6 @@
namespace Drupal\edit;
use Drupal;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
......
......@@ -7,7 +7,6 @@
namespace Drupal\edit\Form;
use Drupal;
use Drupal\Core\Entity\EntityInterface;
use Drupal\user\TempStoreFactory;
......
......@@ -7,8 +7,6 @@
namespace Drupal\field;
use Drupal;
/**
* Static service container wrapper for Field.
*/
......@@ -21,7 +19,7 @@ class Field {
* Returns a field info object.
*/
public static function fieldInfo() {
return Drupal::service('field.info');
return \Drupal::service('field.info');
}
}
......@@ -7,8 +7,6 @@
namespace Drupal\locale;
use Drupal;
/**
* Static service container wrapper for locale.
*/
......@@ -25,6 +23,6 @@ class Locale {
* @return \Drupal\locale\LocaleConfigManager
*/
public static function config() {
return Drupal::service('locale.config.typed');
return \Drupal::service('locale.config.typed');
}
}
......@@ -7,7 +7,6 @@
namespace Drupal\views;
use Drupal;
use Drupal\views\Plugin\views\query\QueryPluginBase;
use Drupal\views\ViewStorageInterface;
use Drupal\Component\Utility\Tags;
......
......@@ -7,8 +7,6 @@
namespace Drupal\views;
use Drupal;
/**
* Static service container wrapper for views.
*/
......@@ -21,7 +19,7 @@ class Views {
* Returns a views data cache object.
*/
public static function viewsData() {
return Drupal::service('views.views_data');
return \Drupal::service('views.views_data');
}
/**
......@@ -31,7 +29,7 @@ public static function viewsData() {
* Returns a views data helper object.
*/
public static function viewsDataHelper() {
return Drupal::service('views.views_data_helper');
return \Drupal::service('views.views_data_helper');
}
/**
......@@ -41,7 +39,7 @@ public static function viewsDataHelper() {
* Returns a views executable factory.
*/
public static function executableFactory() {
return Drupal::service('views.executable');
return \Drupal::service('views.executable');
}
/**
......@@ -51,7 +49,7 @@ public static function executableFactory() {
* Returns a view analyzer object.
*/
public static function analyzer() {
return Drupal::service('views.analyzer');
return \Drupal::service('views.analyzer');
}
/**
......@@ -63,7 +61,7 @@ public static function analyzer() {
* @return \Drupal\views\Plugin\ViewsPluginManager
*/
public static function pluginManager($type) {
return Drupal::service('plugin.manager.views.' . $type);
return \Drupal::service('plugin.manager.views.' . $type);
}
/**
......@@ -72,7 +70,7 @@ public static function pluginManager($type) {
* @return \Drupal\views\Plugin\ViewsHandlerManager
*/
public static function handlerManager($type) {
return Drupal::service('plugin.manager.views.' . $type);
return \Drupal::service('plugin.manager.views.' . $type);
}
/**
......@@ -85,7 +83,7 @@ public static function handlerManager($type) {
* A view executable instance, from the loaded entity.
*/
public static function getView($id) {
$view = Drupal::service('plugin.manager.entity')->getStorageController('view')->load($id);
$view = \Drupal::service('plugin.manager.entity')->getStorageController('view')->load($id);
if ($view) {
return static::executableFactory()->get($view);
}
......
......@@ -11,7 +11,6 @@
use Drupal\views\Views;
use Drupal\views\Entity\View;
use Drupal\views\ViewExecutableFactory;
use Drupal;
use Drupal\Core\DependencyInjection\ContainerBuilder;
class ViewsTest extends UnitTestCase {
......@@ -52,7 +51,7 @@ protected function setUp() {
->will($this->returnValue($view_storage_controller));
$container->set('plugin.manager.entity', $entity_manager);
Drupal::setContainer($container);
\Drupal::setContainer($container);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment