WebformSelection.php in Webform 8.5
File
src/Plugin/EntityReferenceSelection/WebformSelection.php
View source
<?php
namespace Drupal\webform\Plugin\EntityReferenceSelection;
use Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection;
use Drupal\Core\Form\FormStateInterface;
class WebformSelection extends DefaultSelection {
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$form['auto_create']['#access'] = FALSE;
return $form;
}
protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') {
$query = parent::buildEntityQuery($match, $match_operator);
$query
->condition('template', FALSE);
$query
->condition('archive', FALSE);
return $query;
}
}