-
Notifications
You must be signed in to change notification settings - Fork 118
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
Issue 1694: node_referenced_by_field condition plugin #808
Conversation
Seth this is amazing! One thing to mention is that "Node referenced by field" took a while to parse (for someone who didn't know what it was talking about before hand). I know this is a bit more verbose, but maybe 'Node is the target of an entity reference field' |
I suppose we could use "Node is referenced by other nodes" since the form only supplies entity reference fields associated with nodes in the dropdown. |
Although that isn't strictly accurate, because a node referencing itself would still return true. |
I like 'Node is referenced by other entities,' from a non-dev perspective. If "Node is referenced by other nodes" is accurate, then that's simpler still, at least for my comfort level with Drupal. |
👍 from me on the wording. |
I'll smoketest this. |
Just realizing this now. We'll need to |
... also sort them.
Works as advertised, doesn't show up in block placement widget, watchdog is clean. Ready to merge. |
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and smoke tested.
…itions' (Islandora#925) There was a cleanup done for this deprecation in Islandora#764 before the 'NodeReferencedByNode' condition was made, then the deprecated annotation must have just been missed in reviewing Islandora#808.
GitHub Issue: Islandora/documentation#1694
What does this Pull Request do?
Adds a context condition plugin to detect if is a node is referenced by the configured field. It can be used, for example, to determine if a node is referenced by field_member_of, useful for complex objects. It isn't currently used by any islandora contexts in islandora_defaults, but is being made available as a potentially useful condition.
Sidenote: this plugin could be fairly easily modified to also include a count threshold, e.g. is referenced by at least n nodes... but that is a PR for another day.
What's new?
How should this be tested?
Addendum:
Interested parties
@Islandora/8-x-committers, esp @rosiel.