Tripal
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
Drupal\tripal_chado\TripalField\ChadoFieldItemBase Class Reference
Inheritance diagram for Drupal\tripal_chado\TripalField\ChadoFieldItemBase:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal_chado\TripalField\ChadoFieldItemBase:
Collaboration graph
[legend]

Public Member Functions

 storageSettingsForm (array &$form, FormStateInterface $form_state, $has_data)
 
 storageSettingsFormBaseTableAjaxCallback ($form, &$form_state)
 
 storageSettingsFormLinkingMethodAjaxCallback ($form, &$form_state)
 
- Public Member Functions inherited from Drupal\tripal\TripalField\TripalFieldItemBase
 fieldSettingsForm (array $form, FormStateInterface $form_state)
 
 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 defaultStorageSettings ()
 
static storageSettingsFormValidateBaseTable (array $form, FormStateInterface $form_state)
 
static storageSettingsFormValidateLinkingMethod (array $form, FormStateInterface $form_state)
 
- Static Public Member Functions inherited from Drupal\tripal\TripalField\TripalFieldItemBase
static defaultFieldSettings ()
 
static fieldSettingsFormValidate (array $form, FormStateInterface $form_state)
 
static propertyDefinitions (FieldStorageDefinitionInterface $field_definition)
 
static schema (FieldStorageDefinitionInterface $field_definition)
 
- Static Public Member Functions inherited from Drupal\tripal\TripalField\Interfaces\TripalFieldItemInterface
static tripalTypes ($field_definition)
 

Protected Member Functions

 getBaseTables ($linked_table, $has_linker_table=FALSE)
 
 getTableColumns ($table_name='', $column_types=[])
 
 getLinkerTables ($linked_table, $base_table, $delimiter=" \u{2192} ")
 
- Protected Member Functions inherited from Drupal\tripal\TripalField\TripalFieldItemBase
 buildVocabularyTermTable (array &$elements, \Drupal\tripal\TripalVocabTerms\TripalTerm $term, \Drupal\tripal\TripalVocabTerms\TripalIdSpaceBase $idSpace, \Drupal\tripal\TripalVocabTerms\TripalVocabularyBase $vocabulary)
 

Static Protected Attributes

static $table_column_delimiter = " \u{2192} "
 

Detailed Description

Defines the Tripal field item base class.

Member Function Documentation

◆ defaultStorageSettings()

static Drupal\tripal_chado\TripalField\ChadoFieldItemBase::defaultStorageSettings ( )
static

{{}}

Reimplemented from Drupal\tripal\TripalField\TripalFieldItemBase.

Reimplemented in 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, and Drupal\tripal_chado\Plugin\Field\FieldType\ChadoAdditionalTypeTypeDefault.

◆ getBaseTables()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::getBaseTables (   $linked_table,
  $has_linker_table = FALSE 
)
protected

Return a list of candidate base tables. We only want to present valid tables to the user, which are those with an appropriate foreign key.

Parameters
string$linked_tableThe Chado table being linked to via a foreign key.
bool$has_linker_tableWhen set to false (default), base tables are only those tables with a foreign key to $linked_table. When set to true, also include tables based on two foreign keys in linker tables, one to the specified $linked_table, and a second to a different table.
Returns
array The list of tables is returned in an alphabetized list ready to use in a form select.

◆ getLinkerTables()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::getLinkerTables (   $linked_table,
  $base_table,
  $delimiter = " \u{2192} " 
)
protected

Return a list of candidate linking connections given a base table and a linked table. These can either be a column in the base table, or a connection through a linking table that connects the base table to the linked table. In some cases there may be more than one way to link the two tables, so the list generated here can be presented to the site administrator to select the desired linking method.

Parameters
string$base_tableThe Chado table being used for the current entity (subject).
string$linked_tableThe Chado table being linked to (object).
string$delimiterThe displayed delimiter between the table and column in the form select. This defaults to a right arrow.
Returns
array The list of tables is returned in an alphabetized list ready to use in a form select. The list elements will be in the format table.column

◆ getTableColumns()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::getTableColumns (   $table_name = '',
  $column_types = [] 
)
protected

Return a list of column names for the indicated table.

Parameters
string$table_nameThe Chado table of interest.
array$column_typesIf specified, limit to specified column types, e.g. "character varying", "text", "bigint", etc.
Returns
array The list of columns is returned in an alphabetized list ready to use in a form select.

◆ storageSettingsForm()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::storageSettingsForm ( array &  $form,
FormStateInterface  $form_state,
  $has_data 
)

◆ storageSettingsFormBaseTableAjaxCallback()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::storageSettingsFormBaseTableAjaxCallback (   $form,
$form_state 
)

Ajax callback to update the base column select. The select can't be populated until we know the base table.

Parameters
array$formThe form array.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state object.

◆ storageSettingsFormLinkingMethodAjaxCallback()

Drupal\tripal_chado\TripalField\ChadoFieldItemBase::storageSettingsFormLinkingMethodAjaxCallback (   $form,
$form_state 
)

Ajax callback to update the linking method select. The select can't be populated until we know the base table.

Parameters
array$formThe form array.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state object.

◆ storageSettingsFormValidateBaseTable()

static Drupal\tripal_chado\TripalField\ChadoFieldItemBase::storageSettingsFormValidateBaseTable ( array  $form,
FormStateInterface  $form_state 
)
static

Form element validation handler for base table

Parameters
array$formThe form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state of the (entire) configuration form.

◆ storageSettingsFormValidateLinkingMethod()

static Drupal\tripal_chado\TripalField\ChadoFieldItemBase::storageSettingsFormValidateLinkingMethod ( array  $form,
FormStateInterface  $form_state 
)
static

Form element validation handler for linking method (table + column)

Parameters
array$formThe form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface$form_stateThe form state of the (entire) configuration form.

The documentation for this class was generated from the following file: