function _taxonomy_access_vocab_controlled_terms in Taxonomy Access Control 7
Retrieves a list of terms controlled by the global default for a role.
Parameters
int $rid: The role ID.
Return value
array A list of term IDs.
Related topics
1 call to _taxonomy_access_vocab_controlled_terms()
- _taxonomy_access_get_nodes_for_defaults in ./
taxonomy_access.module - Gets node IDs associated with a given vocabulary.
File
- ./
taxonomy_access.module, line 794 - Allows administrators to specify access control for taxonomy categories.
Code
function _taxonomy_access_vocab_controlled_terms($vids, $rid) {
// Accept either a single vocabulary ID or an array thereof.
if (is_numeric($vids)) {
$vids = array(
$vids,
);
}
$tids = db_query("SELECT td.tid\n FROM {taxonomy_term_data} td\n INNER JOIN {taxonomy_access_term} ta ON td.tid = ta.tid\n WHERE ta.rid = :rid\n AND td.vid IN (:vids)", array(
':rid' => $rid,
':vids' => $vids,
))
->fetchCol();
return $tids;
}