summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlex Pott2013-06-19 19:51:22 (GMT)
committerAlex Pott2013-06-19 20:21:35 (GMT)
commit16c9b52dbfa2e4f80f5cc0c4ee083e3646ba165e (patch)
treee40578a15cfe7fcf9f6c2738cbcdad1d54aa2c36 /core
parent4e7abeed4fc1369dd8b87a804d15e4a0bad1be96 (diff)
Issue #2001202 by DmitryDrozdik, ebeyrent: Replace drupal_container() with Drupal::service() in the aggregator module.
Diffstat (limited to 'core')
-rw-r--r--core/modules/aggregator/aggregator.admin.inc4
-rw-r--r--core/modules/aggregator/aggregator.module4
-rw-r--r--core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc
index f26d4ff..0800960 100644
--- a/core/modules/aggregator/aggregator.admin.inc
+++ b/core/modules/aggregator/aggregator.admin.inc
@@ -73,8 +73,8 @@ function aggregator_form_category_validate($form, &$form_state) {
function aggregator_form_category_submit($form, &$form_state) {
// @todo Replicate this cache invalidation when these ops are separated.
// Invalidate the block cache to update aggregator category-based derivatives.
- if (module_exists('block')) {
- drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+ if (Drupal::moduleHandler()->moduleExists('block')) {
+ Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
if ($form_state['values']['op'] == t('Delete')) {
$title = $form_state['values']['title'];
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index ebc45bd..d2c07af 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -345,7 +345,7 @@ function aggregator_save_category($edit) {
->condition('cid', $edit['cid'])
->execute();
// Make sure there is no active block for this category.
- if (module_exists('block')) {
+ if (Drupal::moduleHandler()->moduleExists('block')) {
foreach (entity_load_multiple_by_properties('block', array('plugin' => 'aggregator_category_block:' . $edit['cid'])) as $block) {
$block->delete();
}
@@ -365,7 +365,7 @@ function aggregator_save_category($edit) {
->execute();
$op = 'insert';
}
- if (isset($op) && module_exists('menu_link')) {
+ if (isset($op) && Drupal::moduleHandler()->moduleExists('menu_link')) {
menu_link_maintain('aggregator', $op, $link_path, $edit['title']);
}
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
index 9d06667..73c015d 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
@@ -209,7 +209,7 @@ class Feed extends EntityNG implements FeedInterface {
*/
public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
// Invalidate the block cache to update aggregator feed-based derivatives.
- if (module_exists('block')) {
+ if (\Drupal::moduleHandler()->moduleExists('block')) {
\Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
$storage_controller->deleteCategories($entities);