function og_vocab_service in OG Vocabulary 6
Implementation of hook_service().
File
- ./
og_vocab.services.inc, line 11 - Integration of services module with og_vocab module.
Code
function og_vocab_service() {
return array(
// Get vocabs from group.
array(
'#method' => 'og_vocab.getVocabs',
'#callback' => 'og_vocab_service_get_vocabularies',
'#access callback' => 'og_vocab_service_get_access',
'#key' => FALSE,
'#args' => array(
array(
'#name' => 'nid',
'#type' => 'int',
'#description' => t('A node ID of a group node.'),
),
),
'#return' => 'struct',
'#help' => t('Returns the vocabularies associated with a group.'),
),
// Get group from vocab.
array(
'#method' => 'og_vocab.getGroup',
'#callback' => 'og_vocab_service_get_group',
'#access callback' => 'og_vocab_service_get_access',
'#key' => FALSE,
'#args' => array(
array(
'#name' => 'vid',
'#type' => 'int',
'#description' => t('Vocabulary ID.'),
),
),
'#return' => 'struct',
'#help' => t('Returns the group ID associated with a vocabulary ID.'),
),
);
}