Tripal
|
Public Member Functions | |
addTypes (string $field_name, array $types) | |
updateValues (&$values) | |
deleteValues ($values) | |
findValues ($values) | |
insertValues (&$values) | |
loadValues (&$values) | |
validateValues ($values) | |
getStoredTypes () | |
![]() | |
__construct (array $configuration, $plugin_id, $plugin_definition, TripalLogger $logger) | |
addFieldDefinition (string $field_name, object $field_definition) | |
getFieldDefinition (string $field_name) | |
getTypes () | |
getPropertyType (string $field_name, string $key) | |
removeTypes (string $field_name, array $types) | |
publishForm ($form, FormStateInterface &$form_state) | |
publishFormValidate ($form, FormStateInterface &$form_state) | |
publishFromSubmit ($form, FormStateInterface &$form_state) | |
![]() | |
getStoredValues () | |
Additional Inherited Members | |
![]() | |
static | create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) |
![]() | |
cloneValues ($values) | |
addEmptyValuesItem (&$values, $field_name) | |
![]() | |
$logger | |
$field_definitions = [] | |
$property_types = [] | |
Chado implementation of the TripalStorageInterface.
@TripalStorage( id = "drupal_sql_storage", label = @Translation("Drupal SQL Storage"), description = @Translation("This storage backend is used for fields which would like to use the default Drupal SQL-based field storage with a Tripal-based Field."), )
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::addTypes | ( | string | $field_name, |
array | $types | ||
) |
inheritdoc}
OVERRIDES TripalStorageBase to ensure all field properties are set to save to Drupal!
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::deleteValues | ( | $values | ) |
Deletes the given array of property values from this tripal storage plugin.
array | $values | Array of \Drupal\tripal\TripalStorage\StoragePropertyValue objects. |
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::findValues | ( | $values | ) |
Finds and returns all property values stored in this storage plugin implementation that matches the given match argument.
array | $values | Associative array 5-levels deep. The 1st level is the field name (e.g. ChadoOrganismDefault). The 2nd level is the delta value (e.g. 0). The 3rd level is a field key name (i.e. record_id + value). The 4th level must contain the following three keys/value pairs
|
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::getStoredTypes | ( | ) |
Returns a list of property types that should be stored.In order to link data in the storage backend, the storage system must link the record in someway with Drupal entities. This most likely happens in tables in the Drupal schema (usually the public
schema). This function should return the list of properties that must be stored in order to uniquely identify an entity in the datastore.
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::insertValues | ( | & | $values | ) |
Inserts values in the field data store.The record Ids of the inserted records will be set in the property value objects.
array | $values | Associative array 5-levels deep. The 1st level is the field name (e.g. ChadoOrganismDefault). The 2nd level is the delta value (e.g. 0). The 3rd level is a field key name (i.e. record_id + value). The 4th level must contain the following three keys/value pairs
|
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::loadValues | ( | & | $values | ) |
Loads the values of the field data store.
array | $values | Associative array 5-levels deep. The 1st level is the field name (e.g. ChadoOrganismDefault). The 2nd level is the delta value (e.g. 0). The 3rd level is a field key name (i.e. record_id + value). The 4th level must contain the following three keys/value pairs
|
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::updateValues | ( | & | $values | ) |
Updates values in the field data store.
array | $values | Associative array 5-levels deep. The 1st level is the field name (e.g. ChadoOrganismDefault). The 2nd level is the delta value (e.g. 0). The 3rd level is a field key name (i.e. record_id + value). The 4th level must contain the following three keys/value pairs
|
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::validateValues | ( | $values | ) |
Performs validation checks on values.
array | $values | Array of \Drupal\tripal\TripalStorage\StoragePropertyValue objects. |
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.