public function TripalFieldWidget::submit

3.x TripalFieldWidget.inc public TripalFieldWidget::submit($form, &$form_state, $entity_type, $entity, $langcode, $delta)

Performs extra commands when the entity form is submitted.

Drupal typically does not provide a submit hook for fields. The TripalField provides one to allow for behind-the-scenes actions to occur. This function should never be used for updates, deletes or inserts for the Chado table associated with the field. Rather, the storage backend should be allowed to handle inserts, updates deletes. However, it is permissible to perform inserts, updates or deletions within Chado using this function. Those operations can be performed if needed but on other tables not directly associated with the field.

An example is the chado.feature_synonym table. The chado_linker__synonym field allows the user to provide a brand new synonynm and it must add it to the chado.synonym table prior to the record in the chado.feature_synonym table. This insert occurs in the widgetFormSubmit function.

Parameters

$entity_type: The type of $entity. @param $entity The entity for the operation. @param $field The field structure for the operation. @param $instance The instance structure for $field on $entity's bundle. @param $langcode The language associated with $items. @param $items $entity->{$field['field_name']}[$langcode], or an empty array if unset. @param $form The submitted form array. @param $form_state. The form state array.

13 methods override TripalFieldWidget::submit()
data__accession_widget::submit in tripal_chado/includes/TripalFields/data__accession/data__accession_widget.inc
data__sequence_coordinates_widget::submit in tripal_chado/includes/TripalFields/data__sequence_coordinates/data__sequence_coordinates_widget.inc
data__sequence_length_widget::submit in tripal_chado/includes/TripalFields/data__sequence_length/data__sequence_length_widget.inc
go__gene_expression_widget::submit in tripal_chado/includes/TripalFields/go__gene_expression/go__gene_expression_widget.inc
ogi__location_on_map_widget::submit in tripal_chado/includes/TripalFields/ogi__location_on_map/ogi__location_on_map_widget.inc

... See full list

File

tripal/includes/TripalFields/TripalFieldWidget.inc, line 164

Class

TripalFieldWidget

Code

public function submit($form, &$form_state, $entity_type, $entity, $langcode, $delta) {

}