blast_ui.module 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @file
  4. * .module file of TripalD3.
  5. */
  6. use Drupal\Core\Url;
  7. /**
  8. * Implements hook_theme().
  9. * Used by BLAST UI submission forms.
  10. *
  11. * @see templates in /templates
  12. */
  13. function blast_ui_theme($existing, $type, $theme, $path) {
  14. $context_links = [
  15. 'link_Nucleotide' => \Drupal::l(t('Nucleotide'), Url::fromRoute('blast_ui.nucleotide')),
  16. 'link_blastn' => \Drupal::l(t('blastn'), Url::fromRoute('blast_ui.nucleotide_nucleotide')),
  17. 'link_blastx' => \Drupal::l(t('blastx'), Url::fromRoute('blast_ui.nucleotide_protien')),
  18. 'link_Protien' => \Drupal::l(t('Protein'), Url::fromRoute('blast_ui.protien')),
  19. 'link_tblastn' => \Drupal::l(t('tblastn'), Url::fromRoute('blast_ui.protien_nucleotide')),
  20. 'link_blastp' => \Drupal::l(t('blastp'), Url::fromRoute('blast_ui.protien_protien'))
  21. ];
  22. $variables = [
  23. // BLAST UI Menupage.
  24. 'theme-blast-ui-menupage' => [
  25. 'variables' => ['context_links' => $context_links],
  26. 'template' => 'template-blast-ui-menupage',
  27. ],
  28. ];
  29. return $variables;
  30. }