public function views_handler_relationship_node_term_data::init in Views (for Drupal 7) 7.3
Let relationships live on tables other than the table they operate on.
Overrides views_handler_relationship::init
File
- modules/
taxonomy/ views_handler_relationship_node_term_data.inc, line 18 - Definition of views_handler_relationship_node_term_data.
Class
- views_handler_relationship_node_term_data
- Relationship handler to return the taxonomy terms of nodes.
Code
public function init(&$view, &$options) {
parent::init($view, $options);
// Convert legacy vids option to machine name vocabularies.
if (!empty($this->options['vids'])) {
$vocabularies = taxonomy_get_vocabularies();
foreach ($this->options['vids'] as $vid) {
if (isset($vocabularies[$vid], $vocabularies[$vid]->machine_name)) {
$this->options['vocabularies'][$vocabularies[$vid]->machine_name] = $vocabularies[$vid]->machine_name;
}
}
}
}