Tripal
|
Public Member Functions | |
fieldSettingsForm (array $form, FormStateInterface $form_state) | |
storageSettingsForm (array &$form, FormStateInterface $form_state, $has_data) | |
tripalStorageId () | |
tripalSave ($field_item, $field_name, $prop_types, $prop_values, $entity) | |
tripalLoad ($field_item, $field_name, $prop_types, $prop_values, $entity) | |
tripalClear ($field_item, $field_name, $prop_types, $prop_values, $entity) | |
sanitizeKey ($key) | |
tripalValuesTemplate ($field_definition, $default_value=NULL) | |
Static Public Member Functions | |
static | defaultFieldSettings () |
static | defaultStorageSettings () |
static | fieldSettingsFormValidate (array $form, FormStateInterface $form_state) |
static | propertyDefinitions (FieldStorageDefinitionInterface $field_definition) |
static | schema (FieldStorageDefinitionInterface $field_definition) |
![]() | |
static | tripalTypes ($field_definition) |
Protected Member Functions | |
buildVocabularyTermTable (array &$elements, \Drupal\tripal\TripalVocabTerms\TripalTerm $term, \Drupal\tripal\TripalVocabTerms\TripalIdSpaceBase $idSpace, \Drupal\tripal\TripalVocabTerms\TripalVocabularyBase $vocabulary) | |
Defines the Tripal field item base class.
|
protected |
A helper function for the fieldSettingsForm.
Builds the table the describes the term assigned to the field.
array | $elements | |
\Drupal\tripal\TripalVocabTerms\TripalTerm | $term | |
\Drupal\tripal\TripalVocabTerms\TripalIdSpaceBase | $idSpace | |
\Drupal\tripal\TripalVocabTerms\TripalVocabularyBase | $vocabulary |
|
static |
{}
Reimplemented in Drupal\tripal_chado\Plugin\Field\FieldType\ChadoUnitTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSynonymTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStudyTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStringTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStockTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSourceDataTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceLengthTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceChecksumTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoPubTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoProtocolTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoProjectTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoOrganismTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoLinkerPropertyTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoFeatureTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoFeatureMapTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoDbxrefTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoContactTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoBiomaterialTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAssayTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoArrayDesignTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAnalysisTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAdditionalTypeTypeDefault, and Drupal\tripal\Plugin\Field\FieldType\TripalStringTypeItem.
|
static |
{}
Reimplemented in Drupal\tripal_chado\TripalField\ChadoFieldItemBase, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoUnitTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoTextTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSynonymTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStudyTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStringTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStockTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSourceDataTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceLengthTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSequenceChecksumTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoPubTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoProtocolTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoProjectTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoOrganismTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoLinkerPropertyTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoIntegerTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoFeatureTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoFeatureMapTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoDbxrefTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoContactTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoBooleanTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoBiomaterialTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAssayTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoArrayDesignTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAnalysisTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAdditionalTypeTypeDefault, and Drupal\tripal\Plugin\Field\FieldType\TripalStringTypeItem.
Drupal\tripal\TripalField\TripalFieldItemBase::fieldSettingsForm | ( | array | $form, |
FormStateInterface | $form_state | ||
) |
{}
|
static |
Form element validation handler
array | $form | The form where the settings form is being included in. |
\Drupal\Core\Form\FormStateInterface | $form_state | The form state of the (entire) configuration form. |
|
static |
{}
Drupal\tripal\TripalField\TripalFieldItemBase::sanitizeKey | ( | $key | ) |
Santizies 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 |
|
static |
{}
Drupal\tripal\TripalField\TripalFieldItemBase::storageSettingsForm | ( | array & | $form, |
FormStateInterface | $form_state, | ||
$has_data | |||
) |
{}
Reimplemented in Drupal\tripal_chado\TripalField\ChadoFieldItemBase, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoSynonymTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoStringTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoLinkerPropertyTypeDefault, Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAdditionalTypeTypeDefault, and Drupal\tripal\Plugin\Field\FieldType\TripalStringTypeItem.
Drupal\tripal\TripalField\TripalFieldItemBase::tripalClear | ( | $field_item, | |
$field_name, | |||
$prop_types, | |||
$prop_values, | |||
$entity | |||
) |
{Clears all field values from the given entity.This is to prevent Drupal from storing field values when they are being stored in the Tripal field storage backend.
\Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface | $field_item | The field item for which properties should be saved. |
string | $field_name | The name of the field. |
array | $prop_types | Array of \Drupal\tripal\TripalStorage\StoragePropertyType objects. |
array | $prop_values | Array of \Drupal\tripal\TripalStorage\StoragePropertyValue objects. |
\Drupal\tripal\TripalStorage\TripalEntityBase | $entity | The entity. |
Implements Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface.
Drupal\tripal\TripalField\TripalFieldItemBase::tripalLoad | ( | $field_item, | |
$field_name, | |||
$prop_types, | |||
$prop_values, | |||
$entity | |||
) |
{Loads the values from the given array of properties to the given entity.
\Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface | $field_item | The field item for which properties should be saved. |
string | $field_name | The name of the field. |
array | $prop_types | Array of \Drupal\tripal\TripalStorage\StoragePropertyType objects. |
array | $prop_values | Array of \Drupal\tripal\TripalStorage\StoragePropertyValue objects. |
\Drupal\tripal\TripalStorage\TripalEntityBase | $entity | The entity. |
Implements Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface.
Drupal\tripal\TripalField\TripalFieldItemBase::tripalSave | ( | $field_item, | |
$field_name, | |||
$prop_types, | |||
$prop_values, | |||
$entity | |||
) |
{Saves the values to the given array of properties from the given entity.
\Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface | $field_item | The field item for which properties should be saved. |
string | $field_name | The name of the field. |
array | $prop_types | Array of \Drupal\tripal\TripalStorage\StoragePropertyType objects. |
array | $prop_values | Array of \Drupal\tripal\TripalStorage\StoragePropertyValue objects. |
\Drupal\tripal\TripalStorage\TripalEntityBase | $entity | The entity. |
Implements Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface.
Drupal\tripal\TripalField\TripalFieldItemBase::tripalStorageId | ( | ) |
{Returns the tripal storage plugin id for this field.
Implements Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface.
Drupal\tripal\TripalField\TripalFieldItemBase::tripalValuesTemplate | ( | $field_definition, | |
$default_value = NULL |
|||
) |
{Returns an array of StoragePropertyValue objects.This array seves as as "template" for loading, storing and finding fields in the underlying data store. Each fiels' property types will have a corresponding value in this array. If the $deafult_value is provided then the property whose key is returend by the mainPropertyName() function will get set.Fields normally do not need to implement this function. However, if the $default_value argument is used and the default value is not the value stored in the underlying datastore (e.g., the value is a combination of all of the property values), then the implementing function can override this function to split the value and set the values for the other properties.
object | $field_definition | The field configuration object. This can be an instance of: \Drupal\field\Entity\FieldStorageConfig or \Drupal\field\Entity\FieldConfig |
$default_value | Optional. If a value is provided then then the property whose key is returned by the mainPropertyName() function will get set to the value provided. |
Implements Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface.