# give/4.16.8.1/src/DonationForms/AsyncData/FormGrid/FormGridView.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 56 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/DonationForms/AsyncData/FormGrid/FormGridView.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/DonationForms/AsyncData/FormGrid/FormGridView.php
- Modified: 2024-08-28T18:13:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8.1/code/src/DonationForms/AsyncData/FormGrid/FormGridView.php#L10-L20`.

```php
<?php

namespace Give\DonationForms\AsyncData\FormGrid;

use Give\DonationForms\AsyncData\AsyncDataHelpers;

/**
 * @since 3.16.0
 */
class FormGridView
{
    /**
     * @since 3.16.0
     */
    public function maybeUsePlaceholderOnGoalAmountRaised(bool $usePlaceholder = false): bool
    {
        if (FormGridViewOptions::isProgressBarAmountRaisedAsync()) {
            $usePlaceholder = true;
        }

        return $usePlaceholder;
    }

    /**
     * @since 3.16.0
     */
    public function maybeSetProgressBarAmountRaisedAsync($amountRaisedCachedValue, $formId)
    {
        if (FormGridViewOptions::isProgressBarAmountRaisedAsync()) {
            return AsyncDataHelpers::getSkeletonPlaceholder('1rem');
        }

        if (FormGridViewOptions::useCachedMetaKeys()) {
            return $amountRaisedCachedValue;
        }

        return AsyncDataHelpers::getFormRevenueValue($formId);
    }

    /**
     * @since 3.16.0
     */
    public function maybeSetProgressBarDonationsCountAsync($donationsCountCachedValue, $formId)
    {
        if (FormGridViewOptions::isProgressBarDonationsCountAsync()) {
            return AsyncDataHelpers::getSkeletonPlaceholder('1rem');
        }

        if (FormGridViewOptions::useCachedMetaKeys()) {
            return $donationsCountCachedValue;
        }

        return AsyncDataHelpers::getFormDonationsCountValue($formId);
    }
}

```
