You are here

function views_handler_filter_node_access_level::options_form in Views Node Access Level 7

Provide the basic form which calls through to subforms.

If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.

Overrides views_handler_filter::options_form

File

views/views_handler_filter_node_access_level.inc, line 20
Definition of views_handler_filter_node_access.

Class

views_handler_filter_node_access_level
Filter by node_access records.

Code

function options_form(&$form, &$form_state) {
  $form['value'] = array(
    '#type' => 'select',
    '#title' => t('Node access level'),
    '#description' => t('Level of access to a node'),
    '#options' => array(
      'view' => t('View'),
      'update' => t('Edit'),
      'delete' => t('Delete'),
    ),
    '#default_value' => $this->value ? $this->value : 'view',
  );
  $form['caution'] = array(
    '#markup' => t('Note: for Edit and Delete access, <strong>only node access grants</strong> are checked. Modules can override node access grants to allow or deny actions, so this check does not necessarily reflect whether the user can actually perform the Edit or Delete action.'),
  );
}