Completed
Pull Request — master (#16)
by Simon
01:15
created

getPartialForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Firesphere\PartialUserforms\Extensions;
4
5
use Firesphere\PartialUserforms\Forms\PasswordForm;
6
use Firesphere\PartialUserforms\Models\PartialFormSubmission;
7
use SilverStripe\Core\Extension;
8
use SilverStripe\UserForms\Control\UserDefinedFormController;
9
use SilverStripe\View\Requirements;
10
11
/**
12
 * Class UserDefinedFormControllerExtension
13
 *
14
 * @package Firesphere\PartialUserforms\Extensions
15
 * @property UserDefinedFormController|UserDefinedFormControllerExtension $owner
16
 */
17
class UserDefinedFormControllerExtension extends Extension
18
{
19
    private static $allowed_actions = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
20
        'verify'
21
    ];
22
    /**
23
     * @var null|PartialFormSubmission
24
     */
25
    protected $partialForm;
26
27
    public function onBeforeInit()
28
    {
29
        Requirements::javascript('firesphere/partialuserforms:client/dist/main.js');
30
    }
31
32
    public function verify()
33
    {
34
        return $this;
35
    }
36
37
    public function getPartialForm()
38
    {
39
        return $this->partialForm;
40
    }
41
}
42