diff --git a/core/modules/aggregator/aggregator.routing.yml b/core/modules/aggregator/aggregator.routing.yml index 23b4d76..ad75ec2 100644 --- a/core/modules/aggregator/aggregator.routing.yml +++ b/core/modules/aggregator/aggregator.routing.yml @@ -107,6 +107,5 @@ aggregator_categorize_feed_form: pattern: '/aggregator/sources/{aggregator_feed}/categorize' defaults: _form: '\Drupal\aggregator\Form\CategorizeFeedForm' - entity_type: 'aggregator_feed' requirements: _permission: 'administer news feeds' diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeCategoryForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeCategoryForm.php index 4bc7c9e..dc50c87 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeCategoryForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeCategoryForm.php @@ -23,7 +23,7 @@ public function getFormID() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, $cid = NULL) { - $items = $this->storageController->loadByCategory($cid); + $items = $this->aggregatorItemStorage->loadByCategory($cid); return $this->prepareFormItems($items); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFeedForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFeedForm.php index 6f29b60..c8d1f2a 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFeedForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFeedForm.php @@ -25,7 +25,7 @@ public function getFormID() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, FeedInterface $aggregator_feed = NULL) { - $items = $this->storageController->loadByFeed($aggregator_feed->id()); + $items = $this->aggregatorItemStorage->loadByFeed($aggregator_feed->id()); return $this->prepareFormItems($items, $aggregator_feed); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFormBase.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFormBase.php index 59fe4a0..8e4aa70 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFormBase.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/CategorizeFormBase.php @@ -7,6 +7,7 @@ namespace Drupal\aggregator\Form; +use Drupal\aggregator\FeedInterface; use Drupal\aggregator\ItemInterface; use Drupal\aggregator\ItemStorageControllerInterface; use Drupal\Component\Utility\String; @@ -23,11 +24,11 @@ abstract class CategorizeFormBase implements FormInterface, ControllerInterface { /** - * The Render controller. + * The aggregator item render controller. * * @var \Drupal\Core\Entity\EntityRenderControllerInterface */ - protected $renderController; + protected $aggregatorItemRenderer; /** * The aggregator config. @@ -48,25 +49,25 @@ * * @var \Drupal\aggregator\ItemStorageControllerInterface */ - protected $storageController; + protected $aggregatorItemStorage; /** * Constructs a \Drupal\aggregator\Controller\AggregatorController object. * - * @param \Drupal\Core\Entity\EntityRenderControllerInterface $render_controller + * @param \Drupal\Core\Entity\EntityRenderControllerInterface $aggregator_item_renderer * The item render controller. * @param \Drupal\Core\Database\Connection $database * The database connection. * @param \Drupal\Core\Config\Config $config * The aggregator config. - * @param \Drupal\aggregator\ItemStorageControllerInterface $storage_controller + * @param \Drupal\aggregator\ItemStorageControllerInterface $aggregator_item_storage * The aggregator item storage controller. */ - public function __construct(EntityRenderControllerInterface $render_controller, Connection $database, Config $config, ItemStorageControllerInterface $storage_controller) { - $this->renderController = $render_controller; + public function __construct(EntityRenderControllerInterface $aggregator_item_renderer, Connection $database, Config $config, ItemStorageControllerInterface $aggregator_item_storage) { + $this->aggregatorItemRenderer = $aggregator_item_renderer; $this->database = $database; $this->config = $config; - $this->storageController = $storage_controller; + $this->aggregatorItemStorage = $aggregator_item_storage; } /** @@ -92,7 +93,7 @@ public static function create(ContainerInterface $container) { * @return array * A form builder array. */ - protected function prepareFormItems($items, $feed = NULL) { + protected function prepareFormItems(array $items, FeedInterface $feed = NULL) { $form['feed_source'] = array( '#value' => $feed, @@ -104,7 +105,7 @@ protected function prepareFormItems($items, $feed = NULL) { '#type' => 'table', '#header' => array('', t('Categorize')), ); - if ($items && ($form_items = $this->renderController->viewMultiple($items, 'default'))) { + if ($items && ($form_items = $this->aggregatorItemRenderer->viewMultiple($items, 'default'))) { foreach (element_children($form_items) as $iid) { $categories_result = $this->database->query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = :iid', array(':iid' => $iid));