Tripal
|
Public Member Functions | |
__construct (array $configuration, $plugin_id, $plugin_definition) | |
getIdSpaceNames () | |
getLabel () | |
recordExists () | |
isValid () | |
getNameSpace () | |
destroy () | |
getTerms ($name, $exact=True) | |
setURL ($url) | |
getURL () | |
setLabel ($label) | |
createRecord () | |
addIdSpace ($idSpace) | |
removeIdSpace ($idSpace) | |
![]() | |
getName () | |
Protected Member Functions | |
loadVocab () | |
Protected Attributes | |
$messageLogger = NULL | |
$is_valid = False | |
![]() | |
$messageLogger = NULL | |
Default implementation of the TripalVocabularyBase.
@TripalVocabulary( id = "tripal_default_vocabulary", label = @Translation("Deafult Tripal Vocabulary Plugin"), )
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::__construct | ( | array | $configuration, |
$plugin_id, | |||
$plugin_definition | |||
) |
{{{}}}
Reimplemented from Drupal\tripal\TripalVocabTerms\TripalVocabularyBase.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::addIdSpace | ( | $idSpace | ) |
Adds the id space with the given collection name to this vocabulary. The given collection name must be a valid id space collection.
string | $idSpace | The id space collection name. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::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\TripalVocabulary\TripalDefaultVocabulary::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.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::getIdSpaceNames | ( | ) |
Returns list of id space collection names that is contained in this vocabulary.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::getLabel | ( | ) |
Returns the label of the vocabulary.This is the human readable proper name of the vocabulary.Note that the name of the collection serves as the namespace of the vocabulary.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::getNameSpace | ( | ) |
Returns the namespace of the vocabulary
This should be identical to the name of the collection, and therefore, there is no setter function.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::getTerms | ( | $name, | |
$exact = True |
|||
) |
{{Returns the terms in this vocabulary whose names match the given name. Matches can only be exact or a substring depending on the given flag. The default is to only return exact matches.
string | $name | The name. |
bool | $exact | True to only include exact matches else include all substring matches. |
Reimplemented from Drupal\tripal\TripalVocabTerms\TripalVocabularyBase.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::getURL | ( | ) |
Returns the URL of this vocabulary.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::isValid | ( | ) |
Tests if this collection is valid or not.
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalCollectionPluginInterface.
|
protected |
Loads the vocabulary record.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::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\TripalVocabulary\TripalDefaultVocabulary::removeIdSpace | ( | $idSpace | ) |
Removes the id space from this vocabulary with the given collection name.
string | $idSpace | The id space collection name. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::setLabel | ( | $label | ) |
Sets the label for the vocabulary.This is the human readable proper name of the vocabulary.Note that the name of the collection serves as the namespace of the vocabulary.
string | $label | The name of the vocabulary. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.
Drupal\tripal\Plugin\TripalVocabulary\TripalDefaultVocabulary::setURL | ( | $url | ) |
Sets the URL of this vocabulary to the given URL.
string | $url | The URL. |
Implements Drupal\tripal\TripalVocabTerms\Interfaces\TripalVocabularyInterface.