PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.2
GiveWP – Donation Plugin and Fundraising Platform v4.15.2
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 2.31.0 2.31.1 All 253 releases
give / src / FormMigration / Actions / MapSettingsToDesignHeader.php
MapSettingsToDesignHeader.php
38 lines 994 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\FormMigration\Actions;
4
5 use Give\DonationForms\Models\DonationForm;
6 use Give\FormMigration\DataTransferObjects\DesignHeaderSettings;
7 use Give\FormMigration\DataTransferObjects\DonationSummarySettings;
8 use Give\Framework\Blocks\BlockCollection;
9
10 class MapSettingsToDesignHeader
11 {
12 /**
13 * @var DonationForm
14 */
15 protected $form;
16
17 public function __construct(DonationForm $form)
18 {
19 $this->form = $form;
20 }
21
22 public static function make(DonationForm $form): self
23 {
24 return new self($form);
25 }
26
27 public function __invoke(DesignHeaderSettings $settings)
28 {
29 $this->form->settings->showHeader = $settings->isEnabled();
30
31 $this->form->settings->showHeading = $settings->hasHeading();
32 $this->form->settings->heading = $settings->getHeading();
33
34 $this->form->settings->showDescription = $settings->hasDescription();
35 $this->form->settings->description = $settings->getDescription();
36 }
37 }
38