You are here

function theme_cctags_level in cctags 8

Same name and namespace in other branches
  1. 6 cctags.module \theme_cctags_level()
  2. 7 cctags.module \theme_cctags_level()
1 string reference to 'theme_cctags_level'
cctags_theme in ./cctags.module
2 theme calls to theme_cctags_level()
CctagsBlock::build in src/Plugin/Block/CctagsBlock.php
Builds and returns the renderable array for this block plugin.
CctagsController::content in src/Controller/CctagsController.php
Call back for route static_content.

File

./cctags.module, line 188

Code

function theme_cctags_level($variables) {
  $terms = $variables['terms'];
  $amount = $variables['amount'];
  $page = $variables['page'];
  $out = $variables['out'];
  $start_term = $amount * $page;
  $term_out = [];
  foreach ($terms as $vocbulary_name => $term_list) {
    foreach ($term_list as $term) {
      $term_out[] = [
        '#theme' => 'cctags_term',
        '#term' => $term['link']
          ->toString(),
        '#mode' => $out,
      ];
    }
  }
  return $term_out;
}