function tvi_permission in Taxonomy Views Integrator 7
Implements hook_permission().
File
- ./
tvi.module, line 63 - Allow to define views to be used instead of default drupal behavior on taxonomy terms pages.
Code
function tvi_permission() {
$permissions = array();
$permissions['administer taxonomy views integrator'] = array(
'title' => t('Administer Taxonomy Views Integrator'),
);
foreach (taxonomy_get_vocabularies() as $vocabulary) {
$permissions['define view for vocabulary ' . $vocabulary->machine_name] = array(
'title' => t('Define the view for the vocabulary %vocabulary', array(
'%vocabulary' => $vocabulary->name,
)),
);
$permissions['define view for terms in ' . $vocabulary->machine_name] = array(
'title' => t('Define the view for terms in %vocabulary', array(
'%vocabulary' => $vocabulary->name,
)),
);
}
return $permissions;
}