Tripal
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Drupal\tripal\Services\SyncTripalFieldStorage Class Reference
Collaboration diagram for Drupal\tripal\Services\SyncTripalFieldStorage:
Collaboration graph
[legend]

Public Member Functions

 __construct (EntityTypeManagerInterface $entityTypeManager, Connection $drupal_connection)
 
 detectDifferences (string|null $entity_type=NULL, array $difference_types=[])
 
 resolveDetectedDifferences (array $differences)
 
 resolveDifferences (string $entity_type=NULL, array $difference_types=[])
 

Protected Attributes

EntityTypeManagerInterface $entityTypeManager
 
Connection $drupal_connection
 

Detailed Description

Resolve discrepancies between the Drupal field tables + Tripal Field schema.

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal\Services\SyncTripalFieldStorage::__construct ( EntityTypeManagerInterface  $entityTypeManager,
Connection  $drupal_connection 
)

Constructs a SyncTripalFieldStorage object.

Member Function Documentation

◆ detectDifferences()

Drupal\tripal\Services\SyncTripalFieldStorage::detectDifferences ( string|null  $entity_type = NULL,
array  $difference_types = [] 
)

Identify discrepancies between drupal field tables and tripal field schema.

Parameters
string$entity_typeThe id of the entity type whose associated fields we want to check. If this parameter is ommitted then all TripalEntityType instances will be checked.
array$difference_typesA list of the types of differences to detect. If omitted then all supported types of differences will be checked. The supported types include:
  • missing_property_column: where a column for a new TripalField property does not have a column in the corresponding Drupal field table.
Returns
array

◆ resolveDetectedDifferences()

Drupal\tripal\Services\SyncTripalFieldStorage::resolveDetectedDifferences ( array  $differences)

Resolve already detected differences.

Parameters
array$differencesAn array of the form returned by detectDifferences() where you wish all the included differences to be fixed.
Returns
void

◆ resolveDifferences()

Drupal\tripal\Services\SyncTripalFieldStorage::resolveDifferences ( string  $entity_type = NULL,
array  $difference_types = [] 
)

Identify + resolve differences between drupal tables + tripal field schema.

Parameters
string$entity_typeThe id of the entity type whose associated fields we want to fix. If this parameter is omitted then all TripalEntityType instances will be fixed.
array$difference_typesA list of the types of differences to detect. If omitted then all supported types of differences will be fixed. The supported types include:
  • missing_property_column: where a column for a new TripalField property does not have a column in the corresponding Drupal field table.

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