Server IP : 192.158.238.246 / Your IP : 18.191.203.35 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/7779/cwd/plugins/give/src/DonationForms/Factories/ |
Upload File : |
<?php namespace Give\DonationForms\Factories; use Give\DonationForms\Properties\FormSettings; use Give\DonationForms\ValueObjects\DonationFormStatus; use Give\DonationForms\ValueObjects\GoalType; use Give\Framework\Blocks\BlockCollection; use Give\Framework\Models\Factories\ModelFactory; class DonationFormFactory extends ModelFactory { /** * @since 3.0.0 */ public function definition(): array { $blocksJson = file_get_contents( GIVE_PLUGIN_DIR . 'src/FormBuilder/resources/js/form-builder/src/blocks.json' ); return [ 'title' => __('GiveWP Donation Form', 'give'), 'status' => DonationFormStatus::PUBLISHED(), 'settings' => FormSettings::fromArray([ 'enableDonationGoal' => false, 'goalAmount' => $this->faker->numberBetween(100, 5000), 'enableAutoClose' => false, 'registration' => 'none', 'goalType' => GoalType::AMOUNT(), 'designId' => 'classic', 'showHeading' => true, 'showDescription' => true, 'heading' => __('Support Our Cause', 'give'), 'description' => __( 'Help our organization by donating today! All donations go directly to making a difference for our cause.', 'give' ), 'goalAchievedMessage' => __('Thank you to all our donors, we have met our fundraising goal.', 'give'), ]), 'blocks' => BlockCollection::fromJson($blocksJson), ]; } }