1c1 < diff --git a/core/modules/system/lib/Drupal/system/Controller/DateFormatListingController.php b/core/modules/system/lib/Drupal/system/Controller/DateFormatListingController.php --- > diff --git a/core/modules/system/lib/Drupal/system/Controller/DateTimeController.php b/core/modules/system/lib/Drupal/system/Controller/DateTimeController.php 3c3 < index 0000000..ae7dfc4 --- > index 0000000..82df586 5,6c5,6 < +++ b/core/modules/system/lib/Drupal/system/Controller/DateFormatListingController.php < @@ -0,0 +1,98 @@ --- > +++ b/core/modules/system/lib/Drupal/system/Controller/DateTimeController.php > @@ -0,0 +1,102 @@ 11c11 < + * Contains \Drupal\system\Controller\DateFormatListingController. --- > + * Contains \Drupal\system\Controller\DateTimeController. 18d17 < +use \Drupal\Core\Config\ConfigFactory; 21a21,22 > + * > + * @todo "DateTimeController" seems like too generic of a name for this class. 23,31c24 < +class DateFormatListingController implements ControllerInterface { < + < + < + /** < + * Config Factory Service. < + * < + * @var \Drupal\Core\Config\ConfigFactory < + */ < + protected $ConfigFactory; --- > +class DateTimeController implements ControllerInterface { 37c30 < + return new static($container->get('config.factory')); --- > + return new static(); 43,44c36 < + public function __construct(ConfigFactory $config_factory) { < + $this->ConfigFactory = $config_factory; --- > + public function __construct() { 53c45 < + public function adminOverview() { --- > + public function formats() { 62c54 < + $formats = $this->ConfigFactory->get('system.date')->get('formats'); --- > + $formats = $this->getDateFormats(); 103a96,107 > + > + /** > + * Get the date formats out of the configuration system. > + */ > + protected function getDateFormats() { > + // @todo, Crell suggests replacing the direct usage of system_get_date_formats() > + // with this protected method that gets the config system out of the container > + // and then does the same task as system_get_date_formats(). I'm not sure > + // If that should be done now or in a bulk replacement of system_get_date_formats() > + // everywhere. > + return system_get_date_formats(); > + } 235c239 < index cbf9f44..294bd3d 100644 --- > index 0d472e5..30581a9 100644 251c255 < index 9859d6a..58f3536 100644 --- > index 9859d6a..8487446 100644 262c266 < + _content: '\Drupal\system\Controller\DateFormatListingController::adminOverview' --- > + _content: '\Drupal\system\Controller\DateTimeController::formats'