diff --cc core/modules/user/lib/Drupal/user/Controller/UserListController.php index 4d2a406,16558f8..0000000 --- a/core/modules/user/lib/Drupal/user/Controller/UserListController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserListController.php @@@ -31,31 -31,45 +32,42 @@@ class UserListController extends Entity protected $queryFactory; /** + * The date service. + * + * @var \Drupal\Core\Datetime\Date + */ + protected $dateService; + + /** * Constructs a new UserListController object. * - * @param string $entity_type - * The type of entity to be listed. - * @param array $entity_info - * An array of entity info for the entity type. + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_info + * The entity info for the entity type. * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage * The entity storage controller class. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke hooks on. * @param \Drupal\Core\Entity\Query\QueryFactory $query_factory * The entity query factory. + * @param \Drupal\Core\Datetime\Date $date_service + * The date service. */ - public function __construct(EntityTypeInterface $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, QueryFactory $query_ - public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, QueryFactory $query_ - parent::__construct($entity_type, $entity_info, $storage, $module_handler); ++ public function __construct(EntityTypeInterface $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, QueryFactory $query_ + parent::__construct($entity_info, $storage, $module_handler); $this->queryFactory = $query_factory; + $this->dateService = $date_service; } /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_info) { return new static( - $entity_type, $entity_info, - $container->get('entity.manager')->getStorageController($entity_type), + $container->get('entity.manager')->getStorageController($entity_info->id()), $container->get('module_handler'), - $container->get('entity.query') + $container->get('entity.query'), + $container->get('date') ); }