diff --git a/core/lib/Drupal/Core/Entity/Plugin/Condition/Deriver/EntityBundle.php b/core/lib/Drupal/Core/Entity/Plugin/Condition/Deriver/EntityBundle.php index 738dc7fe77..0b3ae80113 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/Condition/Deriver/EntityBundle.php +++ b/core/lib/Drupal/Core/Entity/Plugin/Condition/Deriver/EntityBundle.php @@ -4,7 +4,7 @@ use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Plugin\Context\ContextDefinition; +use Drupal\Core\Plugin\Context\EntityContextDefinition; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -49,7 +49,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $this->derivatives[$entity_type_id]['label'] = $entity_type->getBundleLabel(); $this->derivatives[$entity_type_id]['provider'] = $entity_type->getProvider(); $this->derivatives[$entity_type_id]['context'] = [ - $entity_type_id => new ContextDefinition('entity:' . $entity_type_id), + $entity_type_id => EntityContextDefinition::fromEntityType($entity_type), ]; } } diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js index 9bfd3053e8..df7d5efe3d 100644 --- a/core/modules/block/js/block.js +++ b/core/modules/block/js/block.js @@ -141,4 +141,4 @@ }); } }; -})(jQuery, window, Drupal); +})(jQuery, window, Drupal); \ No newline at end of file diff --git a/core/modules/node/src/Plugin/Condition/NodeType.php b/core/modules/node/src/Plugin/Condition/NodeType.php index faf23e7379..fe2a91c37b 100644 --- a/core/modules/node/src/Plugin/Condition/NodeType.php +++ b/core/modules/node/src/Plugin/Condition/NodeType.php @@ -19,9 +19,10 @@ * } * ) * - * @deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. - * Use \Drupal\Core\Entity\Plugin\Condition\EntityBundle instead. See - * https://www.drupal.org/node/2919303. + * @deprecated in Drupal 8.7.x, will be removed before Drupal 9.0.0. + * Use \Drupal\Core\Entity\Plugin\Condition\EntityBundle instead. + * + * @see https://www.drupal.org/node/2919303 */ class NodeType extends ConditionPluginBase implements ContainerFactoryPluginInterface { @@ -49,7 +50,7 @@ class NodeType extends ConditionPluginBase implements ContainerFactoryPluginInte */ public function __construct(EntityStorageInterface $entity_storage, array $configuration, $plugin_id, $plugin_definition) { parent::__construct($configuration, $plugin_id, $plugin_definition); - @trigger_error('\Drupal\node\Plugin\Condition\NodeType is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\Plugin\Condition\EntityBundle instead. See https://www.drupal.org/node/2919303.', E_USER_DEPRECATED); + @trigger_error('\Drupal\node\Plugin\Condition\NodeType is deprecated in Drupal 8.7.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\Plugin\Condition\EntityBundle instead. See https://www.drupal.org/node/2919303', E_USER_DEPRECATED); $this->entityStorage = $entity_storage; }