public function SearchApiRelationship::buildOptionsForm in Search API 8
Provide a form to edit options for this plugin.
Overrides RelationshipPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ relationship/ SearchApiRelationship.php, line 60
Class
- SearchApiRelationship
- Views relationship plugin for datasources.
Namespace
Drupal\search_api\Plugin\views\relationshipCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['required']['#access'] = FALSE;
$form['skip_access'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Skip access checks'),
'#description' => $this
->t('Do not verify that the user has access to the entities referenced through this relationship. This will allow you to display data to the user to which they normally would not have access. This should therefore be used with care.'),
'#default_value' => $this->options['skip_access'],
'#weight' => -1,
];
}