Total Complexity | 7 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class GrowingTextarea extends TextareaField |
||
11 | { |
||
12 | use BaseElement; |
||
|
|||
13 | |||
14 | /** |
||
15 | * @config |
||
16 | * @var boolean |
||
17 | */ |
||
18 | private static $enable_requirements = true; |
||
19 | |||
20 | /** |
||
21 | * @var boolean |
||
22 | */ |
||
23 | protected $trim = false; |
||
24 | |||
25 | public function __construct($name, $title = null, $value = '', $config = null) |
||
26 | { |
||
27 | parent::__construct($name, $title, $value); |
||
28 | $this->setRows(1); |
||
29 | } |
||
30 | |||
31 | public function Field($properties = array()) |
||
32 | { |
||
33 | return $this->wrapInElement('growing-textarea', $properties); |
||
34 | } |
||
35 | |||
36 | public function setValue($value, $data = null) |
||
43 | } |
||
44 | |||
45 | public static function requirements() |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Get the value of trim |
||
52 | */ |
||
53 | public function getTrim() |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Set the value of trim |
||
60 | * |
||
61 | * @param bool $trim |
||
62 | */ |
||
63 | public function setTrim($trim) |
||
68 |