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

UserDefinedFormControllerExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A onBeforeInit() 0 4 1
A verify() 0 4 1
A getPartialForm() 0 4 1
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