YamlFormSelection.php in YAML Form 8
File
src/Plugin/EntityReferenceSelection/YamlFormSelection.php
View source
<?php
namespace Drupal\yamlform\Plugin\EntityReferenceSelection;
use Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection;
use Drupal\Core\Form\FormStateInterface;
class YamlFormSelection 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', 0);
return $query;
}
}