|
| | saveRelatedInitialValues (int $delta, string $field_name, int $linker_id, int $type_id, int $related_record_id, int $reverse, FormStateInterface &$form_state) |
| |
| | handleRemove (array &$values, array $form, FormStateInterface $form_state, string $field_name, array $retained_records) |
| |
| | markForDeletion (array &$values, $delta, $reverse, $related_record_id) |
| |
| | preMassageFormValues (array &$values) |
| |
| | saveInitialValues (int $delta, string $field_name, int $linker_id, FormStateInterface &$form_state) |
| |
| | getSelectLimit (?int $select_limit=NULL) |
| |
| | genericSelectElement (string $pkey_column, ?int $default_id, array $options,) |
| |
| | massageLinkingFormValues (string $fkey, array $values, FormStateInterface $form_state, string $linker_key='linker_id',) |
| |
| | genericSelectMassageFormValues (string $pkey_id, array $values) |
| |
| | massagePropertyFormValues (string $val, array $values, FormStateInterface $form_state, ?string $rank_term=NULL, string $linker_key='prop_id',) |
| |
| | getMatchOperatorOptions () |
| |
| | formMultipleElements (FieldItemListInterface $items, array &$form, FormStateInterface $form_state) |
| |
◆ formElement()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::formElement |
( |
FieldItemListInterface |
$items, |
|
|
|
$delta, |
|
|
array |
$element, |
|
|
array & |
$form, |
|
|
FormStateInterface |
$form_state |
|
) |
| |
◆ handleRemove()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::handleRemove |
( |
array & |
$values, |
|
|
array |
$form, |
|
|
FormStateInterface |
$form_state, |
|
|
string |
$field_name, |
|
|
array |
$retained_records |
|
) |
| |
|
protected |
Handle items removed using the "Remove" button
- Parameters
-
| array | &$values | The submitted form values produced by the widget. |
| array | $form | The form array definition. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state. |
| string | $field_name | The machine name of this field. |
| array | $retained_records | Records in the form state at the time of massaging |
- Returns
- void Changes are made to the $values array
◆ markForDeletion()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::markForDeletion |
( |
array & |
$values, |
|
|
|
$delta, |
|
|
|
$reverse, |
|
|
|
$related_record_id |
|
) |
| |
|
protected |
Configures a single record so that it will be deleted by chado storage. Because both subject_id and object_id are set as "store_link", we need to have the original related record ID present in the correct one for deletion.
- Parameters
-
| array | &$values | The values array presented by massageFormValues |
| int | $delta | The numeric index of the item. |
| int | $reverse | The checkbox to reverse subject:object orientation |
| int | $related_record_id | The non-host record, either from subject_id or object_id depending on direction |
- Returns
- void
◆ massageFormValues()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::massageFormValues |
( |
array |
$values, |
|
|
array |
$form, |
|
|
FormStateInterface |
$form_state |
|
) |
| |
◆ preMassageFormValues()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::preMassageFormValues |
( |
array & |
$values | ) |
|
|
protected |
Convert the values from the widget form fields into an updated array containing the items that are expected by the field type.
- Parameters
-
| array | &$values | The values array passed to massageFormValues |
- Returns
- void
◆ saveRelatedInitialValues()
| Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::saveRelatedInitialValues |
( |
int |
$delta, |
|
|
string |
$field_name, |
|
|
int |
$linker_id, |
|
|
int |
$type_id, |
|
|
int |
$related_record_id, |
|
|
int |
$reverse, |
|
|
FormStateInterface & |
$form_state |
|
) |
| |
|
protected |
Saves some values from the initial form state when an entity is first edited for multi-cardinality linking fields. These values are needed to support the "Remove" button.
- Parameters
-
| int | $delta | The numeric index of the item. |
| string | $field_name | The machine name of the field used for linking the info we're saving in form_state with the values submitted by the form. |
| int | $linker_id | The primary key value of the record in the linking table. |
| int | $type_id | The cvterm_id of the relationship type |
| int | $related_record_id | The ID of related record |
| int | $reverse | The checkbox to reverse subject:object orientation |
| FormStateInterface | &$form_state | The current form state. |
◆ validateAutocomplete()
| static Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::validateAutocomplete |
( |
|
$element, |
|
|
FormStateInterface |
$form_state |
|
) |
| |
|
static |
Form element validation handler for the CV term field
- Parameters
-
| array | $element | The form element being validated |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state of the (entire) configuration form |
Reimplemented from Drupal\tripal_chado\TripalField\ChadoWidgetBase.
◆ validateRelatedRecord()
| static Drupal\tripal_chado\Plugin\Field\FieldWidget\ChadoRelationshipWidgetDefault::validateRelatedRecord |
( |
|
$element, |
|
|
FormStateInterface |
$form_state |
|
) |
| |
|
static |
Form element validation handler for the related record field
- Parameters
-
| array | $element | The form element being validated |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state of the (entire) configuration form |
The documentation for this class was generated from the following file:
- tripal_chado/src/Plugin/Field/FieldWidget/ChadoRelationshipWidgetDefault.php