You are here

public function FacetapiDependencyRole::settingsForm in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::settingsForm()
  2. 7 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::settingsForm()

Adds dependency settings to the form.

Overrides FacetapiDependency::settingsForm

File

plugins/facetapi/dependency_role.inc, line 29
Performs a dependency check against the passed content type.

Class

FacetapiDependencyRole
Adds a dependency on content type.

Code

public function settingsForm(&$form, &$form_state) {
  $form[$this->id]['roles'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Show facet for specific roles'),
    '#default_value' => $this->settings['roles'],
    '#options' => array_map('check_plain', user_roles()),
    '#description' => t('Show this facet only for the selected role(s). If you select no roles, the facet will be visible to all users.'),
  );
}