1 | <?php |
||
7 | class SegmentField extends TextField |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private static $allowed_actions = array( |
||
|
|||
13 | 'suggest', |
||
14 | ); |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $template = __CLASS__; |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $modifiers = array(); |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $preview = ''; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $helpText; |
||
35 | |||
36 | /** |
||
37 | * @param array $modifiers |
||
38 | * |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function setModifiers(array $modifiers) |
||
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | public function getModifiers() |
||
55 | |||
56 | /** |
||
57 | * @param string $preview |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setPreview($preview) |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | public function Preview() |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | * |
||
79 | * @param array $properties |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | public function Field($properties = array()) |
||
90 | |||
91 | public function Type() |
||
95 | |||
96 | /** |
||
97 | * @inheritdoc |
||
98 | * |
||
99 | * @param mixed $request |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | public function suggest($request) |
||
128 | |||
129 | /** |
||
130 | * @param SegmentFieldModifier $modifier |
||
131 | * @param mixed $form |
||
132 | * @param mixed $request |
||
133 | * |
||
134 | * @return $this |
||
135 | */ |
||
136 | protected function setModifierProperties(SegmentFieldModifier $modifier, $form, $request) |
||
150 | |||
151 | /** |
||
152 | * @param string $string The secondary text to show |
||
153 | * @return $this |
||
154 | */ |
||
155 | public function setHelpText($string) |
||
160 | |||
161 | /** |
||
162 | * @return string the secondary text to show in the template |
||
163 | */ |
||
164 | public function getHelpText() |
||
168 | } |
||
169 |