diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php index a5e202f..a69de16 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php @@ -265,13 +265,13 @@ public function categories() { public function pageLast() { drupal_add_feed('aggregator/rss', $this->configFactory->get('system.site')->get('name') . ' ' . t('aggregator')); - // @todo Refactor this once all controller conversions are complete. + // @todo Refactor this function once all controller conversions are done. $this->moduleHandler->loadInclude('aggregator', 'inc', 'aggregator.pages'); - // @todo remove this once aggregator_load_feed_items() after https://drupal.org/node/2043581 is in. + // @todo Replace this with ItemStorageController::loadFeedItems() from + // https://drupal.org/node/2043581 when it is in. $items = aggregator_load_feed_items('sum'); - // @todo Refactor this function once after all controller conversions are - // done. + // @todo Refactor this function once all controller conversions are done. return _aggregator_page_list($items, arg(1)); } @@ -282,7 +282,6 @@ public function pageLast() { * A render array as expected by drupal_render(). */ public function sources() { - $feeds = $this->entityManager->getStorageController('aggregator_feed')->loadMultiple(); $build = array( diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/AggregatorCategoryForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/AggregatorCategoryForm.php index 9f14ee6..c591b1f 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/AggregatorCategoryForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/AggregatorCategoryForm.php @@ -7,8 +7,8 @@ namespace Drupal\aggregator\Form; -use Drupal\Core\Config\ConfigFactory; use Drupal\Component\Utility\String; +use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Controller\ControllerInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityManager; @@ -30,11 +30,11 @@ class AggregatorCategoryForm implements FormInterface, ControllerInterface { protected $renderController; /** - * The Config Factory. + * The aggregator config. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\Config */ - protected $configFactory; + protected $config; /** * The database connection. @@ -53,8 +53,8 @@ class AggregatorCategoryForm implements FormInterface, ControllerInterface { /** * Constructs a \Drupal\aggregator\Controller\AggregatorController object. * - * @param \Drupal\Core\Entity\EntityManager $entity_manager - * The entity manager. + * @param \Drupal\Core\Entity\EntityRenderControllerInterface $render_controller + * The item render controller. * @param \Drupal\Core\Database\Connection $database * The database connection. * @param \Drupal\Core\Config\ConfigFactory $config_factory @@ -62,10 +62,10 @@ class AggregatorCategoryForm implements FormInterface, ControllerInterface { * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. */ - public function __construct(EntityManager $entity_manager, Connection $database, ConfigFactory $config_factory, ModuleHandlerInterface $module_handler) { - $this->renderController = $entity_manager->getRenderController('aggregator_item'); + public function __construct(EntityRenderControllerInterface $render_controller, Connection $database, ConfigFactory $config_factory, ModuleHandlerInterface $module_handler) { + $this->renderController = $render_controller; $this->database = $database; - $this->configFactory = $config_factory; + $this->config = $config_factory->get('aggregator.settings'); $this->moduleHandler = $module_handler; } @@ -74,7 +74,7 @@ public function __construct(EntityManager $entity_manager, Connection $database, */ public static function create(ContainerInterface $container) { return new static( - $container->get('plugin.manager.entity'), + $container->get('plugin.manager.entity')->getRenderController('aggregator_item'), $container->get('database'), $container->get('config.factory'), $container->get('module_handler') @@ -126,7 +126,7 @@ public function buildForm(array $form, array &$form_state, $category = NULL) { $done = TRUE; $form['items'][$iid]['item'] = $form_items[$iid]; $form['items'][$iid]['categories'] = array( - '#type' => $this->configFactory->get('aggregator.settings')->get('source.category_selector'), + '#type' => $this->config->get('source.category_selector'), '#default_value' => $selected, '#options' => $categories, '#size' => 10,