123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- /**
- * @file
- * .module file of BLAST UI.
- */
- use Drupal\Core\Url;
- /**
- * Implements hook_theme().
- * Used by BLAST UI submission forms.
- *
- * @see templates in /templates
- */
- function blast_ui_theme($existing, $type, $theme, $path) {
- $context_links = [
- // blast/nucleotide.
- 'link_Nucleotide' => \Drupal::l(t('Nucleotide'), Url::fromRoute('blast_ui.nucleotide')),
- // blast/protein.
- 'link_Protein' => \Drupal::l(t('Protein'), Url::fromRoute('blast_ui.protein')),
-
- // NUCLEOTIDE PROGRAM.
- // blast/nucleotide/nucleotide
- 'link_blastn' => \Drupal::l(t('blastn'), Url::fromRoute('blast_ui.nucleotide_nucleotide')),
- // blast/nucleotide/protein
- 'link_blastx' => \Drupal::l(t('blastx'), Url::fromRoute('blast_ui.nucleotide_protein')),
-
- // PROTEIN PROGRAM.
- // blast/protein/nucleotide.
- 'link_tblastn' => \Drupal::l(t('tblastn'), Url::fromRoute('blast_ui.protein_nucleotide')),
- // blast/protein/protein.
- 'link_blastp' => \Drupal::l(t('blastp'), Url::fromRoute('blast_ui.protein_protein')),
-
- // MISC/ADMIN.
- 'link_config' => \Drupal::l(t('configuration'), Url::fromUri('admin/tripal/extension/tripal_blast/blast_ui')),
- 'link_jobs' => \Drupal::l(t('tripal jobs'), Url::fromUri('blast_ui.protein_nucleotide')),
- 'link_nodeadd' => \Drupal::l(t('create BLAST database'), Url::fromUri('node/add/blastdb')),
- 'link_dbadd' => \Drupal::l(t('configuration'), Url::fromUri('admin/tripal/chado/tripal_db/add')),
- 'link_dbfields' => \Drupal::l(t('drupal field API'), Url::fromUri('admin/structure/types/manage/blastdb/fields'))
- ];
- $variables = [
- // BLAST UI Menupage.
- 'theme-blast-ui-menupage' => [
- 'variables' => ['context_links' => $context_links],
- 'template' => 'template-blast-ui-menupage',
- ],
-
- // BLAST Help page.
- 'theme-blast-ui-help' => [
- 'variables' => ['context_links' => $context_links],
- 'template' => 'template-blast-ui-help',
- ],
- ];
- return $variables;
- }
|