Commit 31440f31 authored by robertom's avatar robertom Committed by boshtian

Issue #3034419 by ReBa, robertom, malcolm_p: Conflict with WebProfiler due to...

Issue #3034419 by ReBa, robertom, malcolm_p: Conflict with WebProfiler due to use of EntityTypeManager in ContextManager
parent ea6051a4
......@@ -4,8 +4,8 @@ namespace Drupal\context;
use Drupal\context\Entity\Context;
use Drupal\context\Plugin\ContextReaction\Blocks;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Entity\EntityFormBuilderInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Plugin\ContextAwarePluginInterface;
use Drupal\Core\Condition\ConditionPluginCollection;
use Drupal\Component\Plugin\Exception\ContextException;
......@@ -66,7 +66,7 @@ class ContextManager {
/**
* Construct.
*
* @param EntityTypeManager $entityTypeManager
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
* The Drupal entity manager service.
* @param ContextRepositoryInterface $contextRepository
* The drupal context repository service.
......@@ -78,7 +78,7 @@ class ContextManager {
* The Drupal EntityFormBuilder service.
*/
public function __construct(
EntityTypeManager $entityTypeManager,
EntityTypeManagerInterface $entityTypeManager,
ContextRepositoryInterface $contextRepository,
ContextHandlerInterface $contextHandler,
EntityFormBuilderInterface $entityFormBuilder,
......
<?php
namespace Drupal\context\Plugin\Condition;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Routing\CurrentRouteMatch;
use Drupal\Core\Condition\ConditionPluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides a 'Views' condition.
*
......@@ -30,10 +31,10 @@ class ViewInclusion extends ConditionPluginBase implements ContainerFactoryPlugi
* @param array $configuration
* @param $plugin_id
* @param $plugin_definition
* @param \Drupal\Core\Entity\EntityTypeManager $entityTypeManager
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
* @param \Drupal\Core\Routing\CurrentRouteMatch
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManager $entityTypeManager, CurrentRouteMatch $currentRouteMatch) {
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager, CurrentRouteMatch $currentRouteMatch) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entityTypeManager;
$this->currentRouteMatch = $currentRouteMatch;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment