*/ class DonationRevenueColumn extends ModelColumn { protected $sortColumn = 'CAST(totalAmountDonated AS DECIMAL)'; /** * @since 2.24.0 * * @inheritDoc */ public static function getId(): string { return 'donationRevenue'; } /** * @since 2.24.0 * * @inheritDoc */ public function getLabel(): string { return __('Total Given', 'give'); } /** * @since 2.24.0 * * @inheritDoc * * @param Donor $model */ public function getCellValue($model, $locale = ''): string { return sprintf( '
%s
', $model->totalAmountDonated->formatToLocale($locale) ); } }