public function EntityQueueRelationship::buildOptionsForm in Entityqueue 8
Provide a form to edit options for this plugin.
Overrides RelationshipPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ relationship/ EntityQueueRelationship.php, line 73
Class
- EntityQueueRelationship
- A relationship handler for entity queues.
Namespace
Drupal\entityqueue\Plugin\views\relationshipCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$queues = EntityQueue::loadMultipleByTargetType($this
->getEntityType());
$options = [];
foreach ($queues as $queue) {
$options[$queue
->id()] = $queue
->label();
}
$form['limit_queue'] = [
'#type' => 'radios',
'#title' => $this
->t('Limit to a specific entity queue'),
'#options' => $options,
'#default_value' => $this->options['limit_queue'],
];
parent::buildOptionsForm($form, $form_state);
}