You are here

function template_preprocess_cmis_browser in CMIS API 8

Same name and namespace in other branches
  1. 8.2 cmis.module \template_preprocess_cmis_browser()
  2. 3.0.x cmis.module \template_preprocess_cmis_browser()

Template preprocess for cmis browser.

Parameters

type $variables:

File

./cmis.module, line 104
Contains cmis.module.

Code

function template_preprocess_cmis_browser(&$variables) {
  if (!empty($variables['elements'])) {
    $breadcrumbs = [
      '#theme' => 'item_list',
      '#items' => $variables['breadcrumbs'],
      '#type' => 'ul',
    ];
    $variables['breadcrumbs'] = render($breadcrumbs);
    $table = array(
      '#theme' => 'table',
      '#header' => $variables['header'],
      '#rows' => $variables['elements'],
      '#sticky' => TRUE,
    );
    $variables['table'] = render($table);
  }
}