# give/4.16.8.1/src/MultiFormGoals/MultiFormGoal/Block.php

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

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/MultiFormGoals/MultiFormGoal/Block.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/MultiFormGoals/MultiFormGoal/Block.php
- Modified: 2021-11-23T23:55:18+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/MultiFormGoals/MultiFormGoal/Block.php#L10-L20`.

```php
<?php

namespace Give\MultiFormGoals\MultiFormGoal;

use Give\MultiFormGoals\MultiFormGoal\Model as MultiFormGoal;

class Block
{

    /**
     * Registers Multi-Form Goal block
     *
     * @since 2.9.0
     **/
    public function addBlock()
    {
        register_block_type(
            'give/multi-form-goal',
            [
                'render_callback' => [$this, 'renderCallback'],
            ]
        );
    }

    /**
     * Returns Progress Bar block markup
     *
     * @since 2.9.0
     **/
    public function renderCallback($attributes, $content)
    {
        $multiFormGoal = new MultiFormGoal(
            [
                'innerBlocks' => $content,
            ]
        );

        return $multiFormGoal->getOutput();
    }
}

```
