# give/4.16.9/src/FormMigration/Actions/MapSettingsToDesignHeader.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 38 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/FormMigration/Actions/MapSettingsToDesignHeader.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/FormMigration/Actions/MapSettingsToDesignHeader.php
- Modified: 2023-10-16T17:55: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.9/code/src/FormMigration/Actions/MapSettingsToDesignHeader.php#L10-L20`.

```php
<?php

namespace Give\FormMigration\Actions;

use Give\DonationForms\Models\DonationForm;
use Give\FormMigration\DataTransferObjects\DesignHeaderSettings;
use Give\FormMigration\DataTransferObjects\DonationSummarySettings;
use Give\Framework\Blocks\BlockCollection;

class MapSettingsToDesignHeader
{
    /**
     * @var DonationForm
     */
    protected $form;

    public function __construct(DonationForm $form)
    {
        $this->form = $form;
    }

    public static function make(DonationForm $form): self
    {
        return new self($form);
    }

    public function __invoke(DesignHeaderSettings $settings)
    {
        $this->form->settings->showHeader = $settings->isEnabled();

        $this->form->settings->showHeading = $settings->hasHeading();
        $this->form->settings->heading = $settings->getHeading();

        $this->form->settings->showDescription = $settings->hasDescription();
        $this->form->settings->description = $settings->getDescription();
    }
}

```
