You are here

function _drupalgap_taxonomy_get_vocabularies in DrupalGap 7.2

Same name and namespace in other branches
  1. 6 drupalgap.resource.inc \_drupalgap_taxonomy_get_vocabularies()
  2. 7 drupalgap.resource.inc \_drupalgap_taxonomy_get_vocabularies()

Retrieves basic data for vocabularies.

Return value

array containing associative array(s) of vocabulary data.

File

./drupalgap.resource.inc, line 391
This file implements the DrupalGap service resource call back functions.

Code

function _drupalgap_taxonomy_get_vocabularies() {
  $query = db_select('taxonomy_vocabulary', 'v');
  $query
    ->fields('v', array(
    'vid',
    'name',
    'machine_name',
    'description',
    'weight',
  ))
    ->orderBy('weight', 'ASC');
  $result = $query
    ->execute();
  return $result
    ->fetchAll();
}