diff --git a/core/modules/user/lib/Drupal/user/Controller/UserAdmin.php b/core/modules/user/lib/Drupal/user/Controller/UserAdmin.php index 58d503e..ffcd801 100644 --- a/core/modules/user/lib/Drupal/user/Controller/UserAdmin.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserAdmin.php @@ -47,7 +47,7 @@ class UserAdmin implements ControllerInterface { * * @var \Drupal\Core\Entity\Query\QueryInterface */ - protected $query; + protected $entityQuery; /** * Constructs a new UserAdmin object. @@ -58,14 +58,14 @@ class UserAdmin implements ControllerInterface { * The module handler. * @param \Drupal\user\UserStorageControllerInterface $storage_controller * The user storage controller. - * @param \Drupal\Core\Entity\Query\QueryInterface $query + * @param \Drupal\Core\Entity\Query\QueryInterface $entity_query * The entity query. */ - public function __construct(Connection $connection, ModuleHandlerInterface $module_handler, UserStorageControllerInterface $storage_controller, QueryInterface $query) { + public function __construct(Connection $connection, ModuleHandlerInterface $module_handler, UserStorageControllerInterface $storage_controller, QueryInterface $entity_query) { $this->connection = $connection; $this->moduleHandler = $module_handler; $this->storageController = $storage_controller; - $this->query = $query; + $this->entityQuery = $entity_query; } /** @@ -96,15 +96,15 @@ public function userList() { 'operations' => t('Operations'), ); - $this->query->condition('uid', 0, '<>'); - $this->query->pager(50); - $this->query->tableSort($header); - $uids = $this->query->execute(); + $this->entityQuery->condition('uid', 0, '<>'); + $this->entityQuery->pager(50); + $this->entityQuery->tableSort($header); + $uids = $this->entityQuery->execute(); $accounts = $this->storageController->loadMultiple($uids); $destination = drupal_get_destination(); $status = array(t('blocked'), t('active')); - $roles = array_map('Drupal\Component\Utility\String::checkPlain', user_role_names(TRUE)); + $roles = array_map('\Drupal\Component\Utility\String::checkPlain', user_role_names(TRUE)); unset($roles[DRUPAL_AUTHENTICATED_RID]); $options = array(); foreach ($accounts as $account) { diff --git a/core/modules/user/user.module b/core/modules/user/user.module index a913894..d850e2c 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -872,6 +872,7 @@ function user_menu() { ); $items['admin/people/create'] = array( + 'title' => 'Add user', 'route_name' => 'user_admin_create', 'type' => MENU_SIBLING_LOCAL_TASK, ); diff --git a/core/modules/views/lib/Drupal/views/Entity/View.php b/core/modules/views/lib/Drupal/views/Entity/View.php index 8cb06e7..82f93c4 100644 --- a/core/modules/views/lib/Drupal/views/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Entity/View.php @@ -320,17 +320,6 @@ public function getExportProperties() { /** * {@inheritdoc} - * - * Figures out which routes are overridden l - * @param EntityStorageControllerInterface $storage_controller - */ - public function preSave(EntityStorageControllerInterface $storage_controller) { - parent::preSave($storage_controller); - } - - - /** - * {@inheritdoc} */ public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) { views_invalidate_cache(); diff --git a/core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php b/core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php index 3d366f1..d908db0 100644 --- a/core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php +++ b/core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php @@ -37,6 +37,7 @@ class RouteSubscriber implements EventSubscriberInterface { * Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance. * * @param \Drupal\Core\Entity\EntityManager $entity_manager + * The entity manager. */ public function __construct(EntityManager $entity_manager) { $this->viewStorageController = $entity_manager->getStorageController('view'); diff --git a/core/modules/views/tests/Drupal/views/Tests/Plugin/display/PathPluginBaseTest.php b/core/modules/views/tests/Drupal/views/Tests/Plugin/display/PathPluginBaseTest.php index f1e846a..c251c41 100644 --- a/core/modules/views/tests/Drupal/views/Tests/Plugin/display/PathPluginBaseTest.php +++ b/core/modules/views/tests/Drupal/views/Tests/Plugin/display/PathPluginBaseTest.php @@ -21,7 +21,7 @@ class PathPluginBaseTest extends UnitTestCase { /** * The route provider that should be used. * - * @var \PHPUnit_Framework_MockObject_MockObject|\Drupal\Core\Routing\RouteProviderInterface + * @var \Drupal\Core\Routing\RouteProviderInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $routeProvider; @@ -61,14 +61,16 @@ public function testAlterRoute() { $collection->add('test_route', new Route('test_route', array('_controller' => 'Drupal\Tests\Core\Controller\TestController'))); $collection->add('test_route_2', new Route('test_route/example', array('_controller' => 'Drupal\Tests\Core\Controller\TestController'))); - $view = $this->getMock('Drupal\views\ViewExecutable'); + $view = $this->getMockBuilder('Drupal\views\ViewExecutable') + ->disableOriginalConstructor() + ->getMock(); $display = array(); $display['display_plugin'] = 'page'; $display['id'] = 'page_1'; $display['display_options'] = array( ); - $this->pathPlugin->initDisplay($view, $display, $options); + // @todo write the actual test. } } diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml index e9cbad4..ee1b500 100644 --- a/core/modules/views/views.services.yml +++ b/core/modules/views/views.services.yml @@ -83,7 +83,7 @@ services: arguments: [views_results] views.route_subscriber: class: Drupal\views\EventSubscriber\RouteSubscriber - arguments: ['@plugin.manager.entity'] + arguments: ['@entity.manager'] tags: - { name: 'event_subscriber' } views.route_access_check: