Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated keyword "context" from Conditions #1274

Closed
mjordan opened this issue Sep 15, 2019 · 2 comments
Closed

Remove deprecated keyword "context" from Conditions #1274

mjordan opened this issue Sep 15, 2019 · 2 comments
Milestone

Comments

@mjordan
Copy link
Contributor

mjordan commented Sep 15, 2019

This is related to #1241.

As @whikloj points out over at #164 (review), annotations for Context Conditions that contain the context keyword, like this:

* @Condition(
 *   id = "parent_node_has_term",
 *   label = @Translation("Parent node for media has term"),
 *   context = {
 *     "media" = @ContextDefinition("entity:media", required = TRUE , label = @Translation("media"))
 *   }
 * )

should be updated to use context_definitions https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Condition!Annotation!Condition.php/property/Condition%3A%3Acontext/8.7.x. So the changed keyword would look like this:

* @Condition(
 *   id = "parent_node_has_term",
 *   label = @Translation("Parent node for media has term"),
 *   context_definitions= {
 *     "media" = @ContextDefinition("entity:media", required = TRUE , label = @Translation("media"))
 *   }
 * )

These Conditions include (files are all in islandora/src/Plugin/Condition/):

  • ContentEntityType.php
  • EntityBundle.php
  • FileUsesFilesystem.php
  • MediaHasTerm.php
  • MediaUsesFilesystem.php
  • NodeHadNamespace.php
  • NodeHasParent.php
  • NodeHasTerm.php
  • NodeIsPublished.php
  • ParentNodeHasTerm.php

This should be an easy PR for someone since the change is just one keyword per class file, and the test process could just be to make sure the Conditions are still showing up in the list of Conditions presented to the user.

@mjordan mjordan added the newbie label Sep 15, 2019
@mjordan mjordan changed the title Remove deprecated keywords from Conditions Remove deprecated keyword "context" from Conditions Sep 15, 2019
@dannylamb dannylamb added this to the 1.1.0 milestone Jan 30, 2020
@dannylamb
Copy link
Contributor

PR up for this one ^^

@seth-shaw-unlv
Copy link
Contributor

Resolved with Islandora/islandora@e9bea0d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants