|
Tripal
|


Public Member Functions | |
| sanitizeKey ($key) | |
Protected Member Functions | |
| formMultipleElements (FieldItemListInterface $items, array &$form, FormStateInterface $form_state) | |
Defines the Tripal field widget base class.
|
protected |
Override Drupal's function to change the behavior of finite cardinality.
In the case of a fixed finite cardinality that is not small, e.g. 100, we don't want to display 100 fields for every delta if they are not populated. See Drupal issue https://www.drupal.org/project/drupal/issues/1156338 We will tell Drupal that it is unlimited cardinality up until the point where we actually hit the cardinality limit. Before that point, we can use the "Add another item" button in the same way as unlimited cardinality fields.
| Drupal\tripal\TripalField\TripalWidgetBase::sanitizeKey | ( | $key | ) |
Sanitizes a property key.
Property keys are often controlled vocabulary IDs, which is the IdSpace and accession separated by a colon. The colon is not supported by the storage backend and must be converted to an underscore. This function performs that task.
| string | $key | A property key e.g. "operation:2945". |