0) {
$variationIcon = 'arrow-up';
$variationClass = 'text-success';
} else {
$variationIcon = 'arrow-down';
$variationClass = 'text-danger';
}
$variationHtml = sprintf('
%s
',
$variationClass,
$this->FontAwesome->getClass($variationIcon),
!empty($variation) ? h($variation) : ''
);
$leftContent = sprintf('%s
%s
%s',
h($title ?? ''),
h($number ?? ''),
$variationHtml
);
$rightContent = sprintf('%s
', $this->element('charts/bar', [
'chartData' => $chartData
]));
$cardContent = sprintf('', $leftContent, $rightContent);
echo $this->Bootstrap->card([
'variant' => 'secondary',
'bodyHTML' => $cardContent,
'bodyClass' => 'p-3'
]);
?>