Active
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity property wrapper
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2012 at 09:46 UTC
Updated:
29 Jun 2012 at 15:55 UTC
For import and export, it's more useful to have the vocab machine name available as entity metadata, rather than the vid.
AFAICT this isn't available directly as a property:
$term = taxonomy_term_load(1);
$wrapper = entity_metadata_wrapper('taxonomy_term', $term);
dsm($wrapper->info());
// Gets a vocabulary object.
$value = $wrapper->vocabulary->value();
dsm($value, 'value');
// Gets a vocab vid.
$value = $wrapper->vocabulary->raw();
dsm($value, 'raw');
Comments
Comment #1
joachim commentedI'm changing this to a bug, as it seems to me that module should be able to expect to do this to any entity:
which fails on terms, because the 'bundle' on terms is the 'vocabulary_machine_name' property.