Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MUR Drupal
d3_sankey
Commits
efb62290
Commit
efb62290
authored
Sep 27, 2016
by
M Parker
Browse files
Respect Tablefield's "Hide table header row" field setting.
parent
83df3cec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/d3_sankey_table_group_pp/d3_sankey_table_group_pp.module
.../d3_sankey_table_group_pp/d3_sankey_table_group_pp.module
+9
-1
No files found.
modules/d3_sankey_table_group_pp/d3_sankey_table_group_pp.module
View file @
efb62290
...
...
@@ -228,6 +228,14 @@ function d3_sankey_table_group_pp_field_formatter_view($entity_type, $entity, $f
// the table grouping preprocessor.
if
(
$display
[
'type'
]
===
'tablefield_d3_sankey_table_group_pp'
)
{
foreach
(
$items
as
$delta
=>
$item
)
{
// For convenience / clarity, make a copy of the rows we are to display.
// Then, if the field settings say to hide the first row, unset it from
// our copy.
$rows
=
$item
[
'tabledata'
];
if
(
$field
[
'settings'
][
'hide_headers'
])
{
unset
(
$rows
[
0
]);
}
// Apply the formatter settings to the chart.
$chart
=
array
(
'sankeyType'
=>
(
string
)
$settings
[
'sankeyType'
],
...
...
@@ -267,7 +275,7 @@ function d3_sankey_table_group_pp_field_formatter_view($entity_type, $entity, $f
// Initialize a GroupingPreprocessor, feed it the query results, get the
// raw data out of the preprocessor, and add it to the chart.
$preprocessor
=
new
TableGroupingPreprocessor
();
foreach
(
$
item
[
'tabledata'
]
as
$row
)
{
foreach
(
$
rows
as
$row
)
{
$preprocessor
->
ingestRow
((
array
)
$row
);
}
$raw_data
=
$preprocessor
->
getRawData
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment