function node_access_test_form_node_form_alter

7.x node_access_test.module node_access_test_form_node_form_alter(&$form, $form_state)

Implements hook_form_BASE_FORM_ID_alter().

File

drupal-7.x/modules/node/tests/node_access_test.module, line 176
A dummy module implementing node access related hooks for testing purposes.

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,
    );
  }
}