FontAwesome->getClass('minus'); } elseif ($variation > 0) { $variationIcon = 'trends-arrow-up-white fs-6'; $variationClass = 'bg-success'; } else { $variationIcon = 'trends-arrow-up-white fs-6 fa-rotate-180 fa-flip-vertical'; $variationClass = 'bg-danger'; } $variationHtml = sprintf( '
%s
', $variationClass, $variationIcon, !empty($variation) ? h($variation) : '' ); $titleHtml = isset($title) ? h($title) : ($titleHtml ?? ''); $leftContent = sprintf('
%s

%s

%s', $titleHtml, h($number ?? ''), $variationHtml ); $rightContent = sprintf('
%s
', $this->element('charts/bar', [ 'chartData' => $chartData, 'chartOptions' => [ ] ])); $cardContent = sprintf('
%s
%s
', $leftContent, $rightContent); echo $this->Bootstrap->card([ 'variant' => 'secondary', 'bodyHTML' => $cardContent, 'bodyClass' => 'p-3', 'class' => 'grow-on-hover shadow-sm' ]); ?>