Tripal
|
Public Member Functions | |
__construct (array $configuration, $plugin_id, $plugin_definition) | |
getParent ($child) | |
setURLPrefix ($prefix) | |
setDefaultVocabulary ($vocab) | |
recordExists () | |
isValid () | |
destroy () | |
removeTerm ($accession) | |
setDescription ($description) | |
getURLPrefix () | |
getDescription () | |
createRecord () | |
getDefaultVocabulary () | |
saveTerm ($term, array $options=[]) | |
![]() | |
getName () | |
![]() | |
getChildren ($parent=NULL) | |
getTerm ($accession, $options=[]) | |
getTerms ($name, $options=[]) | |
saveTerm (TripalTerm $term, array $options=[]) | |
Protected Member Functions | |
loadIdSpace () | |
findTermRecord (TripalTerm $term) | |
insertTerm (TripalTerm $term, array $options) | |
updateTerm (TripalTerm $term, object &$cvterm, array $options) | |
Protected Attributes | |
$is_valid = FALSE | |
![]() | |
$messageLogger = NULL | |
Default Implementation of TripalIdSpaceBase
@TripalIdSpace( id = "tripal_default_id_space", label = @Translation("Deafult Tripal IdSpace"), )
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::__construct | ( | array | $configuration, |
$plugin_id, | |||
$plugin_definition | |||
) |
{{{}}}
Reimplemented from Drupal\tripal\TripalVocabTerms\TripalIdSpaceBase.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::createRecord | ( | ) |
Creates the records needed for this collection.This must only be called once on this new collection instance that has just been created by its collection plugin manager.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::destroy | ( | ) |
Destroys this collection.This must only be called once when on this existing collection that is being removed from its collection plugin manager.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface.
|
protected |
Retrieve a term record from tripal_terms table.
This function uses the IdSpace, vocabulary, and accession values to uniquely identify a term.
TripalTerm | $term | The TripalTerm object to save. |
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::getDefaultVocabulary | ( | ) |
Returns this id space's default vocabulary name or NULL if no default has been set.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::getDescription | ( | ) |
Returns the description of this id space.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::getParent | ( | $child | ) |
Gets the parent of the given term. The given term must be a valid term for this id space. If the given term is a root of this id space then NULL is returned.
Drupal\tripal\TripalVocabTerms\TripalTerm | $child | The given term. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::getURLPrefix | ( | ) |
Returns the URL prefix of this id space.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
|
protected |
Inserts a new term.
The term should be checked that it does not exist prior to calling this function.
\Drupal\tripal\TripalVocabTerms\TripalTerm | $term | The term object to update |
array | $options | The options passed to the saveTerm() function. |
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::isValid | ( | ) |
Tests if this collection is valid or not.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface.
|
protected |
Loads an ID Space record
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::recordExists | ( | ) |
Indicates if the underlying data store has a record for this collection.This function will be called by the collection plugin manager to ensure that the record for this collection exists and if not allow it to create it by calling the create() method or prevent addition of duplicate entries.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::removeTerm | ( | $accession | ) |
Removes the term with the given accession from this id space. All children terms are also removed. !!!WARNING!!! If the removed term in this id space is referenced by entities this could break data integrity. This method must be used with extreme caution!
string | $accession | The accession. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::saveTerm | ( | $term, | |
array | $options = [ ] |
||
) |
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::setDefaultVocabulary | ( | $vocab | ) |
{{Sets the default vocabulary of this id space to the given vocabulary name.Removes this id space from its previous default vocabulary if one is set and then adds this id space to its new default vocabulary if the given name is not NULL. It is still the responsibility of an implementation to actually save changes to its default vocabulary.
string | name The vocabulary name. |
Reimplemented from Drupal\tripal\TripalVocabTerms\TripalIdSpaceBase.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::setDescription | ( | $description | ) |
Sets the description of this id space.
string | $description | The description. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
Drupal\tripal\Plugin\TripalIdSpace\TripalDefaultIdSpace::setURLPrefix | ( | $prefix | ) |
Sets the URL prefix of this id space to the given URL prefix.
string | $prefix | The URL prefix. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalIdSpaceInterface.
|
protected |
Updates an existing term.
The term should be checked that it already exists prior to execution of this function.
\Drupal\tripal\TripalVocabTerms\TripalTerm | $term | The term object to update |
object | $cvterm | The record object for the term to update from the Chado cvterm table. |
array | $options | The options passed to the saveTerm() function. |