|
Tripal
|


Public Member Functions | |
| addTypes (string $field_name, array $types) | |
| updateValues (&$values) | |
| deleteValues ($values) | |
| findValues ($values) | |
| insertValues (&$values) | |
| loadValues (&$values, bool $ignore_cached_fields=TRUE) | |
| validateValues ($values) | |
| getStoredTypes () | |
| getNonStoredTypes () | |
Public Member Functions inherited from Drupal\tripal\TripalStorage\TripalStorageBase | |
| __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) | |
| markPropertiesForCaching (string $field_name, array &$prop_types) | |
| isDrupalStoreByFieldNameKey (string $field_name, string $key, object|null $property_type=NULL) | |
| publishForm ($form, FormStateInterface &$form_state) | |
| publishFormValidate ($form, FormStateInterface &$form_state) | |
| publishFromSubmit ($form, FormStateInterface &$form_state) | |
Public Member Functions inherited from Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface | |
| getStoredValues () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Drupal\tripal\TripalStorage\TripalStorageBase | |
| static | create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) |
Protected Member Functions inherited from Drupal\tripal\TripalStorage\TripalStorageBase | |
| cloneValues ($values) | |
| resetValuesItem (&$values, $field_name, $delta) | |
Protected Attributes inherited from Drupal\tripal\TripalStorage\TripalStorageBase | |
| $logger | |
| $field_definitions = [] | |
| $property_types = [] | |
| $cached_fields = [] | |
| bool | $default_is_required = TRUE |
| Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage::addTypes | ( | string | $field_name, |
| array | $types | ||
| ) |
Adds the property type objects for the current field.
inheritdoc}
OVERRIDES TripalStorageBase to ensure all field properties are set to save to Drupal!
Reimplemented from Drupal\tripal\TripalStorage\TripalStorageBase.
| 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 all property values for this backend instance based on $values.
| 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::getNonStoredTypes | ( | ) |
Returns a list of property types that should not be stored in Drupal.This is the inverse of the getStoredTypes() method. It's needed because all field property types have a column in the Drupal table. However, the "Stored" ones save the value both in Drupal and in the storage backend and the "unstored" ones save an empty value in Drupal that is populated on load by the storage backend.
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, |
| bool | $ignore_cached_fields = TRUE |
||
| ) |
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
|
| bool | $ignore_cached_fields | If TRUE then values from fully cached fields should be ignored as they will be loaded by Drupal; if FALSE then load them from the tripal storage backend. |
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.