You are here

function views_node_access_plugin_access_node_type::options_form in Views node access 7

Same name and namespace in other branches
  1. 6 views_node_access_plugin_access_node_type.inc \views_node_access_plugin_access_node_type::options_form()

Provide the default form for setting options.

Overrides views_plugin_access::options_form

File

./views_node_access_plugin_access_node_type.inc, line 34
Views access plugin that provides node-type-based access control.

Class

views_node_access_plugin_access_node_type
@file Views access plugin that provides node-type-based access control.

Code

function options_form(&$form, &$form_state) {
  $node_types = node_type_get_names();
  $form['node_types'] = array(
    '#type' => 'checkboxes',
    '#options' => array_map('check_plain', $node_types),
    '#title' => t('Node types'),
    '#default_value' => $this->options['node_types'],
    '#description' => t('Only nodes with this types can display the view as tab.'),
  );
}