|
Tripal
|


Public Member Functions | |
| save () | |
| validate () | |
| setDefaults () | |
| id () | |
| getID () | |
| getLabel () | |
| setLabel ($label) | |
| getTermIdSpace () | |
| setTermIdSpace ($termIdSpace) | |
| getTermAccession () | |
| setTermAccession ($termAccession) | |
| getTerm () | |
| setTerm (TripalTerm $term) | |
| getHelpText () | |
| setHelpText ($help_text) | |
| getCategory () | |
| setCategory ($category) | |
| getTitleFormat () | |
| setTitleFormat ($title_format) | |
| getDefaultTitleFormat () | |
| getURLFormat () | |
| setURLFormat ($url_format) | |
| getTokens ($options=[]) | |
| hideEmptyFields () | |
| showEmptyFields () | |
| getEmptyFieldDisplay () | |
| enableAJAXLoading () | |
| disableAJAXLoading () | |
| getAJAXLoadingStatus () | |
Static Public Member Functions | |
| static | create (array $values=[]) |
| static | sortByCategory (TripalEntityTypeInterface $a, TripalEntityTypeInterface $b) |
Protected Attributes | |
| $id | |
| $label | |
| $termIdSpace | |
| $termAccession | |
| $help_text | |
| $category | |
| $title_format | |
| $url_format | |
| $hide_empty_field | |
| $ajax_field | |
Defines the Tripal Content type entity.
@ConfigEntityType( id = "tripal_entity_type", label = @Translation("Tripal Content Type"), label_collection = @Translation("Tripal Content Types"), label_singular = @Translation("Tripal content type"), label_plural = @Translation("Tripal content types"), label_count = @PluralTranslation( singular = "@count Tripal content type", plural = "@count Tripal content types", ), handlers = { "list_builder" = "Drupal\tripal\ListBuilders\TripalEntityTypeListBuilder", "form" = { "add" = "Drupal\tripal\Form\TripalEntityTypeForm", "edit" = "Drupal\tripal\Form\TripalEntityTypeForm", "delete" = "Drupal\tripal\Form\TripalEntityTypeDeleteForm" }, "route_provider" = { "html" = "Drupal\tripal\Routing\TripalEntityTypeHtmlRouteProvider", }, }, config_prefix = "content_type", admin_permission = "manage tripal content types", bundle_of = "tripal_entity", entity_keys = { "id" = "id", "label" = "label", }, links = { "canonical" = "/admin/structure/bio_data/{tripal_entity_type}", "add-form" = "/admin/structure/bio_data/add", "edit-form" = "/admin/structure/bio_data/manage/{tripal_entity_type}", "delete-form" = "/admin/structure/bio_data/manage/{tripal_entity_type}/delete", "collection" = "/admin/structure/bio_data" }, config_export = { "id", "label", "termIdSpace", "termAccession", "help_text", "category", "title_format", "url_format", "hide_empty_field", "ajax_field" } )
|
static |
Contructs a new TripalEntityType object without permanently saving it.
Extends EntityBase::create() with support for TripalTerm as a value.
| array | $values | An array of values to set, keyed by property name. Supported keys are: |
| Drupal\tripal\Entity\TripalEntityType::disableAJAXLoading | ( | ) |
{Configures the entity such that fields will be loaded on page load.}
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::enableAJAXLoading | ( | ) |
{Configures the entity such that fields will be loaded via AJAX after page load.}
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getAJAXLoadingStatus | ( | ) |
{Retrieves the indicator for whether to load fields using AJAX or not.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getCategory | ( | ) |
{Gets the category for this Tripal Entity Type.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getDefaultTitleFormat | ( | ) |
{}
| Drupal\tripal\Entity\TripalEntityType::getEmptyFieldDisplay | ( | ) |
{Retrieves the indicator for whether to hide empty fields or not.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getHelpText | ( | ) |
{Gets help text for admin for this Tripal Entity Type.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getID | ( | ) |
{}
| Drupal\tripal\Entity\TripalEntityType::getLabel | ( | ) |
{Gets the Tripal Entity Type label (e.g. gene).
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getTerm | ( | ) |
{Gets the Tripal Entity Type CV Term Object based off its CV Term ID Space and Accession.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getTermAccession | ( | ) |
{Gets the Tripal Entity Type CV Term Accession.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getTermIdSpace | ( | ) |
{Gets the Tripal Entity Type CV Term ID Space.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getTitleFormat | ( | ) |
{Gets the title format for this Tripal Entity Type.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::getTokens | ( | $options = [] | ) |
{}
| Drupal\tripal\Entity\TripalEntityType::getURLFormat | ( | ) |
{Gets the URL format for this Tripal Entity Type.
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::hideEmptyFields | ( | ) |
{Configures the entity such that empty fields will be hidden.}
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::id | ( | ) |
{}
| Drupal\tripal\Entity\TripalEntityType::save | ( | ) |
Saves the new TripalEntityType permanently.
Extends ConfigEntityBase::save() with support for creating the associated TripalTerm if it doesn't already exist.
When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported.
| Drupal\tripal\Entity\TripalEntityType::setCategory | ( | $category | ) |
{Sets the Tripal Entity Type category.
| string | $category | The Tripal Entity Type category. |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setDefaults | ( | ) |
Set defaults of values which are not yet set.
| Drupal\tripal\Entity\TripalEntityType::setHelpText | ( | $help_text | ) |
{Sets the Tripal Entity Type help text.
| string | $help_text | The Tripal Entity Type help text. |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setLabel | ( | $label | ) |
{Sets the Tripal Entity Type label (e.g. gene).
| string | $label | The Tripal Entity Type label. |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setTerm | ( | TripalTerm | $term | ) |
{}
| Drupal\tripal\Entity\TripalEntityType::setTermAccession | ( | $termAccession | ) |
{Sets the Tripal Entity Type CV Term Accession.
| string | $termIdSpace | The new Tripal Controlled Vocabulary Term Accession |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setTermIdSpace | ( | $termIdSpace | ) |
{Sets the Tripal Entity Type CV Term ID Space.
| string | $termIdSpace | The new Tripal Controlled Vocabulary Term ID Space |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setTitleFormat | ( | $title_format | ) |
{Sets the Tripal Entity Type title format.
| string | $title_format | The Tripal Entity Type title format. |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::setURLFormat | ( | $url_format | ) |
{Sets the Tripal Entity Type URL format.
| string | $url_format | The Tripal Entity Type URL format. |
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
| Drupal\tripal\Entity\TripalEntityType::showEmptyFields | ( | ) |
{Configures the entity such that empty fields will be shown.}
Implements Drupal\tripal\Entity\TripalEntityTypeInterface.
|
static |
Sorts Tripal Entity Types first by category and then by Label.
| $a | The first Tripal Entity Type object. |
| $b | The second Tripal Entity Type object. |
| Drupal\tripal\Entity\TripalEntityType::validate | ( | ) |
Validate the expected values before saving.
Note: This function throws exceptions so make sure to catch them ;-p We do not want users seeing a WSOD.