Completed
Push — develop ( 3af89d...cb4d39 )
by
unknown
07:47
created

ManagerSelect   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
A setValue() 0 10 2
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2017 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Jobs\Form\Element;
12
13
use Zend\Form\Element\Select;
14
use Zend\Form\Element;
15
use Zend\Stdlib\ArrayUtils;
16
17
/**
18
 * ${CARET}
19
 * 
20
 * @author Mathias Gelhausen <[email protected]>
21
 * @todo write test 
22
 */
23
class ManagerSelect extends Select
24
{
25
    public function init()
26
    {
27
        $this->setDisableInArrayValidator(true);
28
    }
29
30
    public function setValue($value)
31
    {
32
        if ('__empty__' == $value) {
33
            return $this->setValue([]);
34
        }
35
36
        $this->setAttribute('data-initialValue', join(',', $value));
37
38
        return parent::setValue($value);
39
    }
40
}