Browse Source

Using context_definitions annotation instead of the deprecated context annotation

pull/764/head
dannylamb 6 years ago
parent
commit
f63a9b3515
  1. 2
      src/Plugin/Condition/ContentEntityType.php
  2. 2
      src/Plugin/Condition/EntityBundle.php
  3. 2
      src/Plugin/Condition/FileUsesFilesystem.php
  4. 2
      src/Plugin/Condition/MediaHasTerm.php
  5. 2
      src/Plugin/Condition/MediaUsesFilesystem.php
  6. 2
      src/Plugin/Condition/NodeHadNamespace.php
  7. 2
      src/Plugin/Condition/NodeHasParent.php
  8. 2
      src/Plugin/Condition/NodeHasTerm.php
  9. 2
      src/Plugin/Condition/NodeIsPublished.php
  10. 2
      src/Plugin/Condition/ParentNodeHasTerm.php

2
src/Plugin/Condition/ContentEntityType.php

@ -11,7 +11,7 @@ use Drupal\Core\Form\FormStateInterface;
* @Condition(
* id = "content_entity_type",
* label = @Translation("Content Entity Type"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = FALSE, label = @Translation("Node")),
* "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media")),
* "file" = @ContextDefinition("entity:file", required = FALSE, label = @Translation("File")),

2
src/Plugin/Condition/EntityBundle.php

@ -11,7 +11,7 @@ use Drupal\Core\Form\FormStateInterface;
* @Condition(
* id = "entity_bundle",
* label = @Translation("Entity Bundle"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = FALSE, label = @Translation("Node")),
* "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media")),
* "taxonomy_term" = @ContextDefinition("entity:taxonomy_term", required = FALSE, label = @Translation("Term"))

2
src/Plugin/Condition/FileUsesFilesystem.php

@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "file_uses_filesystem",
* label = @Translation("File uses filesystem"),
* context = {
* context_definitions = {
* "file" = @ContextDefinition("entity:file", required = TRUE , label = @Translation("file"))
* }
* )

2
src/Plugin/Condition/MediaHasTerm.php

@ -8,7 +8,7 @@ namespace Drupal\islandora\Plugin\Condition;
* @Condition(
* id = "media_has_term",
* label = @Translation("Media has term with URI"),
* context = {
* context_definitions = {
* "media" = @ContextDefinition("entity:media", required = TRUE , label = @Translation("media"))
* }
* )

2
src/Plugin/Condition/MediaUsesFilesystem.php

@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "media_uses_filesystem",
* label = @Translation("Media uses filesystem"),
* context = {
* context_definitions = {
* "media" = @ContextDefinition("entity:media", required = TRUE , label = @Translation("media"))
* }
* )

2
src/Plugin/Condition/NodeHadNamespace.php

@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "node_had_namespace",
* label = @Translation("Node had 7.x namespace"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = TRUE , label = @Translation("node"))
* }
* )

2
src/Plugin/Condition/NodeHasParent.php

@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "node_has_parent",
* label = @Translation("Node has parent"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = TRUE , label = @Translation("node"))
* }
* )

2
src/Plugin/Condition/NodeHasTerm.php

@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "node_has_term",
* label = @Translation("Node has term with URI"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = TRUE , label = @Translation("node"))
* }
* )

2
src/Plugin/Condition/NodeIsPublished.php

@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Condition(
* id = "node_is_published",
* label = @Translation("Node is published"),
* context = {
* context_definitions = {
* "node" = @ContextDefinition("entity:node", required = TRUE , label = @Translation("node"))
* }
* )

2
src/Plugin/Condition/ParentNodeHasTerm.php

@ -8,7 +8,7 @@ namespace Drupal\islandora\Plugin\Condition;
* @Condition(
* id = "parent_node_has_term",
* label = @Translation("Parent node for media has term with URI"),
* context = {
* context_definitions = {
* "media" = @ContextDefinition("entity:media", required = TRUE , label = @Translation("media"))
* }
* )

Loading…
Cancel
Save