Completed
Pull Request — develop (#323)
by Mathias
15:36
created

ManagementForm   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setHeadscripts() 0 6 1
A getHeadscripts() 0 4 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Core\Form\Tree;
12
13
use Core\Form\HeadscriptProviderInterface;
14
use Core\Form\SummaryForm;
15
use Zend\Form\Fieldset;
16
17
/**
18
 * Form for tree management
19
 * 
20
 * @author Mathias Gelhausen <[email protected]>
21
 * @since 0.29
22
 */
23
class ManagementForm extends SummaryForm implements HeadscriptProviderInterface
24
{
25
26
    /**
27
     * Base fieldset.
28
     *
29
     * @var string|Fieldset
30
     */
31
    protected $baseFieldset = 'Core/Tree/ManagementFieldset';
32
33
    /**
34
     * Headscripts.
35
     *
36
     * @var array
37
     */
38
    protected $scripts = [ '/js/html.sortable.min.js', 'Core/js/forms.tree-management.js' ];
39
40
    /**
41
     * Attributes.
42
     *
43
     * @var array
44
     */
45
    protected $attributes = [
46
        'method' => 'POST', /* keep default value from \Zend\Form\Form */
47
        'class' => 'yk-tree-management-form',
48
    ];
49
50
    public function setHeadscripts(array $scripts)
51
    {
52
        $this->scripts = $scripts;
53
54
        return $this;
55
    }
56
57
    public function getHeadscripts()
58
    {
59
        return $this->scripts;
60
    }
61
}