You are here

function TaxonomyAccessTestCase::configureFormRow in Taxonomy Access Control 7

Configures a row on the TAC configuration form.

Parameters

array &$edit: The form data to post.

int $vid: (optional) The vocabulary ID. Defaults to TAXONOMY_ACCESS_GLOBAL_DEFAULT.

$int tid: (optional) The term ID. Defaults to TAXONOMY_ACCESS_VOCABULARY_DEFAULT.

int $view: (optional) The view grant value. Defaults to TAXONOMY_ACCESS_NODE_IGNORE.

int $update: (optional) The update grant value. Defaults to

int $delete: (optional) The delete grant value. Defaults to TAXONOMY_ACCESS_NODE_IGNORE.

int $create: (optional) The create grant value. Defaults to TAXONOMY_ACCESS_TERM_DENY.

int $list: (optional) The list grant value. Defaults to TAXONOMY_ACCESS_TERM_DENY.

4 calls to TaxonomyAccessTestCase::configureFormRow()
TaxonomyAccessConfigTest::testGlobalDefaultConfig in ./taxonomy_access.test
Tests configuring a global default.
TaxonomyAccessConfigTest::testRoleEnableDisable in ./taxonomy_access.test
Tests enabling and disabling TAC for a custom role.
TaxonomyAccessConfigTest::testTermConfig in ./taxonomy_access.test
Tests configuring specific terms.
TaxonomyAccessConfigTest::testVocabularyDefaultConfig in ./taxonomy_access.test
Tests configuring vocabulary defaults.

File

./taxonomy_access.test, line 384
Automated tests for the Taxonomy Access Control module.

Class

TaxonomyAccessTestCase
Provides a base test class and helper methods for automated tests.

Code

function configureFormRow(&$edit, $vid = TAXONOMY_ACCESS_GLOBAL_DEFAULT, $tid = TAXONOMY_ACCESS_VOCABULARY_DEFAULT, $view = TAXONOMY_ACCESS_NODE_IGNORE, $update = TAXONOMY_ACCESS_NODE_IGNORE, $delete = TAXONOMY_ACCESS_NODE_IGNORE, $create = TAXONOMY_ACCESS_TERM_DENY, $list = TAXONOMY_ACCESS_TERM_DENY) {
  $edit["grants[{$vid}][{$tid}][view]"] = $view;
  $edit["grants[{$vid}][{$tid}][update]"] = $update;
  $edit["grants[{$vid}][{$tid}][delete]"] = $delete;
  $edit["grants[{$vid}][{$tid}][create]"] = $create;
  $edit["grants[{$vid}][{$tid}][list]"] = $list;
}