PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / DonationForms / V2 / ValueObjects / DonationFormStatus.php

DonationFormStatus.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/DonationForms/V2/ValueObjects/DonationFormStatus.php

59 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\DonationForms\V2\ValueObjects;
4
5 use Give\Framework\Support\ValueObjects\Enum;
6
7 /**
8 * @since 2.24.0
9 *
10 * @method static DonationFormStatus PENDING()
11 * @method static DonationFormStatus PUBLISHED()
12 * @method static DonationFormStatus PRIVATE ()
13 * @method static DonationFormStatus DRAFT()
14 * @method static DonationFormStatus TRASH()
15 * @method static DonationFormStatus UPGRADED()
16 * @method bool isPending()
17 * @method bool isPublished()
18 * @method bool isPrivate()
19 * @method bool isDraft()
20 * @method bool isTrash()
21 * @method bool isUpgraded()
22 */
23 class DonationFormStatus extends Enum
24 {
25 const PENDING = 'pending';
26 const PUBLISHED = 'publish';
27 const PRIVATE = 'private';
28 const DRAFT = 'draft';
29 const TRASH = 'trash';
30 const UPGRADED = 'upgraded';
31
32 /**
33 * @since 2.24.0
34 *
35 * @return array
36 */
37 public static function labels(): array
38 {
39 return [
40 self::PENDING => __( 'Pending', 'give' ),
41 self::PUBLISHED => __( 'Published', 'give' ),
42 self::PRIVATE => __( 'Private', 'give' ),
43 self::DRAFT => __( 'Draft', 'give' ),
44 self::TRASH => __( 'Trash', 'give' ),
45 self::UPGRADED => __( 'Upgraded', 'give' ),
46 ];
47 }
48
49 /**
50 * @since 2.24.0
51 *
52 * @return string
53 */
54 public function label(): string
55 {
56 return self::labels()[ $this->getValue() ];
57 }
58 }
59