You are here

function taxonomy_access_grant_add_table in Taxonomy Access Control 7

Generates a grant table for adding access rules with one set of values.

Parameters

array $rows: An associative array of access rule data, with the following keys:

  • view: The View grant value select box for the element.
  • update: The Update grant value select box for the element.
  • delete: The Delete grant value select box for the element.
  • create: The Add tag grant value select box for the element.
  • list: The View tag grant value select box for the element.

int $id: The ID for this set (e.g., a vocabulary ID).

Return value

Renderable array containing the table.

See also

taxonomy_access_grant_table()

1 call to taxonomy_access_grant_add_table()
taxonomy_access_admin_role in ./taxonomy_access.admin.inc
Form constructor for a form to manage grants by role.

File

./taxonomy_access.admin.inc, line 436
Administrative interface for taxonomy access control.

Code

function taxonomy_access_grant_add_table($row, $id) {
  $header = taxonomy_access_grant_table_header();
  $table = array(
    '#type' => 'taxonomy_access_grant_table',
    '#tree' => TRUE,
    '#header' => $header,
  );
  $table[$id][TAXONOMY_ACCESS_VOCABULARY_DEFAULT] = taxonomy_access_admin_build_row($row);
  return $table;
}