public function YamlFormEntityReferenceTrait::ajaxEntityReference in YAML Form 8
AJAX callback for entity reference details element.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array An associative array containing entity reference details element.
File
- src/
Plugin/ YamlFormElement/ YamlFormEntityReferenceTrait.php, line 560
Class
- YamlFormEntityReferenceTrait
- Provides an 'entity_reference' trait.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function ajaxEntityReference(array $form, FormStateInterface $form_state) {
$element = $form['properties']['entity_reference'];
return $element;
}