You are here

function spaces_plugin_access_spaces_feature::options_form in Spaces 6

Same name and namespace in other branches
  1. 6.3 includes/spaces_plugin_access_spaces_feature.inc \spaces_plugin_access_spaces_feature::options_form()
  2. 6.2 includes/spaces_plugin_access_spaces_feature.inc \spaces_plugin_access_spaces_feature::options_form()
  3. 7.3 includes/spaces_plugin_access_spaces_feature.inc \spaces_plugin_access_spaces_feature::options_form()
  4. 7 includes/spaces_plugin_access_spaces_feature.inc \spaces_plugin_access_spaces_feature::options_form()

File

includes/spaces_plugin_access_spaces_feature.inc, line 23

Class

spaces_plugin_access_spaces_feature
Provides access control for views by checking against the current space's feature settings.

Code

function options_form(&$form, &$form_state) {
  $options = array();
  foreach (spaces_features() as $feature) {
    $options[$feature->value] = $feature->spaces['label'];
  }
  $form['spaces_feature'] = array(
    '#type' => 'select',
    '#title' => t('Feature'),
    '#default_value' => $this->options['spaces_feature'],
    '#options' => $options,
    '#description' => t('Only allow access to this view if the user has access to the selected feature.'),
  );
}