Closed argiepiano closed 2 years ago
PR #97
@laryn let me know if you want to take a look at these changes before I merge. To test, you can create a metadata wrapper of a taxonomy term and then access the vocabulary properties (like machine_name
or description
) through the chained properties, as in $term_wrapper->vocabulary->description->value()
.
You can also create a wrapper of a post node that has values in the Tags field, and then explore the vocabulary with $node_wrapper->field_tags[0]->vocabulary->name->value()
and so forth.
Before these fixes it was impossible to access vocabulary values. This PR also takes care of the vid
instances as outlined in #71 .
@argiepiano No, if you've tested thoroughly and feel good I say merge away. This is great -- thanks so much for all the improvements and fixes you're creating!
Since Backdrop's taxonomy vocabularies are not entities anymore (see https://github.com/backdrop/backdrop/pull/520), the wrapper code for vocabularies needs to be updated. The fact that they are not entities makes it more difficult.
This is related to #71 . PR coming