function node_access_test_form_node_form_alter

Implements hook_form_BASE_FORM_ID_alter().

File

modules/node/tests/node_access_test.module, line 176

Code

function node_access_test_form_node_form_alter(&$form, $form_state) {
    // Only show this checkbox for NodeAccessBaseTableTestCase.
    if (variable_get('node_access_test_private')) {
        $form['private'] = array(
            '#type' => 'checkbox',
            '#title' => t('Private'),
            '#description' => t('Check here if this content should be set private and only shown to privileged users.'),
            '#default_value' => isset($form['#node']->private) ? $form['#node']->private : FALSE,
        );
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.