Code owners
Assign users and groups as approvers for specific file changes. Learn more.
file_table_formatter.module 672 B
<?php
/**
* @file
* File Table Formatter module.
*/
/**
* Implements hook_theme().
*/
function file_table_formatter_theme() {
return [
'file_table_formatter_table' => [
'template' => 'file-table-formatter-table',
'variables' => [
'data' => NULL,
],
],
];
}
/**
* Preprocess for theme_file_table_formatter_table()
* @param array $variables
*/
function template_preprocess_file_table_formatter_table(&$variables) {
$variables['table'] = [
'#theme' => 'table',
'#header' => $variables['data']->getHeader(),
'#rows' => $variables['data']->getRows(),
];
$variables['title'] = $variables['data']->getTitle();
}