function taxonomy_access_admin_build_row in Taxonomy Access Control 5.2
Same name and namespace in other branches
- 6 taxonomy_access.admin.inc \taxonomy_access_admin_build_row()
- 7 taxonomy_access.admin.inc \taxonomy_access_admin_build_row()
1 call to taxonomy_access_admin_build_row()
- taxonomy_access_admin_form in ./
taxonomy_access_admin.inc - Form for managing grants by role.
File
- ./
taxonomy_access_admin.inc, line 96 - Administrative interface for taxonomy access control.
Code
function taxonomy_access_admin_build_row($grants = NULL) {
$form['#title'] = $title;
$form['#tree'] = TRUE;
foreach (array(
'view',
'update',
'delete',
) as $grant) {
$form[$grant] = array(
'#type' => 'radios',
'#options' => array(
'1' => '',
'0' => '',
'2' => '',
),
//1: Allow, 0: Ignore, 2: Deny
'#default_value' => is_string($grants['grant_' . $grant]) ? $grants['grant_' . $grant] : '0',
'#required' => TRUE,
);
}
foreach (array(
'create',
'list',
) as $grant) {
$form[$grant] = array(
'#type' => 'checkbox',
'#default_value' => is_string($grants['grant_' . $grant]) ? $grants['grant_' . $grant] : '0',
);
}
return $form;
}