Completed
Pull Request — master (#16)
by Simon
11:11 queued 09:59
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 \Firesphere\PartialUserforms\Extensions\UserDefinedFormControllerExtension
13
 *
14
 * @property UserDefinedFormController|UserDefinedFormControllerExtension $owner
15
 */
16
class UserDefinedFormControllerExtension extends Extension
17
{
18
    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...
19
        'verify'
20
    ];
21
    /**
22
     * @var null|PartialFormSubmission
23
     */
24
    protected $partialForm;
25
26
    public function onBeforeInit()
27
    {
28
        Requirements::javascript('firesphere/partialuserforms:client/dist/main.js');
29
    }
30
31
    public function verify()
32
    {
33
        return $this;
34
    }
35
36
    public function getPartialForm()
37
    {
38
        return $this->partialForm;
39
    }
40
}
41