function word_link_exchange_get_taxonomy_terms in Word Link 8
Same name and namespace in other branches
- 7.2 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_get_taxonomy_terms()
- 7 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_get_taxonomy_terms()
Helper function to get taxonomy terms from DB.
1 call to word_link_exchange_get_taxonomy_terms()
- word_link_exchange_import_from_taxonomy in modules/
word_link_exchange/ word_link_exchange.module - Import links from taxonomy terms to DB.
File
- modules/
word_link_exchange/ word_link_exchange.module, line 326 - Code for the Word link exchange module.
Code
function word_link_exchange_get_taxonomy_terms($vid, $from, $limit) {
$query = db_select('taxonomy_term_data', 't');
$query
->range($from, $limit);
$result = $query
->fields('t', array(
'name',
'tid',
))
->condition('t.vid', $vid)
->orderBy('t.tid')
->execute();
foreach ($result as $term) {
$terms[$term->tid] = $term;
}
return $terms;
}