Skip to content

Commit

Permalink
Use template for _buildEmptyDisplay method
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information
MauricioFauth committed Nov 19, 2017
1 parent bdb35e5 commit f50cac4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions libraries/classes/Display/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -2389,10 +2389,10 @@ private function _buildNullDisplay($class, $conditionField, $meta, $align = '')
/**
* Prepares the display for an empty value
*
* @param string $class class of table cell
* @param bool $condition_field whether to add CSS class condition
* @param object $meta the meta-information about this field
* @param string $align cell alignment
* @param string $class class of table cell
* @param bool $conditionField whether to add CSS class condition
* @param object $meta the meta-information about this field
* @param string $align cell alignment
*
* @return string the td
*
Expand All @@ -2402,15 +2402,15 @@ private function _buildNullDisplay($class, $conditionField, $meta, $align = '')
* _getDataCellForGeometryColumns(),
* _getDataCellForNonNumericColumns()
*/
private function _buildEmptyDisplay($class, $condition_field, $meta, $align = '')
private function _buildEmptyDisplay($class, $conditionField, $meta, $align = '')
{
return '<td ' . $align . ' class="'
. $this->_addClass(
$class, $condition_field, $meta, 'nowrap'
)
. '"></td>';
} // end of the '_buildEmptyDisplay()' function
$classes = $this->_addClass($class, $conditionField, $meta, 'nowrap');

return Template::get('display/results/empty_display')->render([
'align' => $align,
'classes' => $classes,
]);
}

/**
* Adds the relevant classes.
Expand Down
1 change: 1 addition & 0 deletions templates/display/results/empty_display.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<td {{ align }} class="{{ classes }}"></td>

0 comments on commit f50cac4

Please sign in to comment.