You are here

function theme_uc_catalog_block in Ubercart 8.4

Same name and namespace in other branches
  1. 6.2 uc_catalog/uc_catalog.module \theme_uc_catalog_block()
  2. 7.3 uc_catalog/uc_catalog.theme.inc \theme_uc_catalog_block()

Themes the catalog block.

See also

theme_uc_catalog_item()

1 string reference to 'theme_uc_catalog_block'
uc_catalog_theme in uc_catalog/uc_catalog.module
Implements hook_theme().
1 theme call to theme_uc_catalog_block()
CatalogBlock::build in uc_catalog/src/Plugin/Block/CatalogBlock.php
Builds and returns the renderable array for this block plugin.

File

uc_catalog/uc_catalog.theme.inc, line 14
Theme functions for the uc_catalog module.

Code

function theme_uc_catalog_block(array $variables) {
  $menu_tree = $variables['menu_tree'];
  $output = '<ul class="catalog menu">';
  foreach ($menu_tree
    ->getChildren() as $branch) {
    list($inpath, $html) = _uc_catalog_navigation($branch);
    $output .= $html;
  }
  $output .= '</ul>';
  return $output;
}