function _paragraphs_table_header in Paragraphs table 8
Get table header.
1 call to _paragraphs_table_header()
File
- ./
paragraphs_table.module, line 170 - Contains paragraphs_table.module.
Code
function _paragraphs_table_header($fields, $show_all = FALSE, $rowWeightCol = FALSE, $is_new = FALSE) {
$header = empty($show_all) ? [
'',
] : [];
foreach ($fields as $field_name => $field) {
$header[] = [
'data' => $field
->getLabel(),
'class' => [
$field_name,
],
];
}
if (empty($show_all) && !$is_new) {
$header[] = [
'data' => '',
'class' => [
'action',
],
];
$header[] = $rowWeightCol;
}
if ($is_new) {
$header[0] = $header[1];
}
return $header;
}