1 | <?php |
||
9 | class SegmentField extends TextField |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private static $allowed_actions = array( |
||
15 | 'suggest', |
||
16 | ); |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $template = __CLASS__; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $modifiers = array(); |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $preview = ''; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $helpText; |
||
37 | |||
38 | /** |
||
39 | * @param array $modifiers |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setModifiers(array $modifiers) |
||
49 | |||
50 | /** |
||
51 | * @return array |
||
52 | */ |
||
53 | public function getModifiers() |
||
57 | |||
58 | /** |
||
59 | * @param string $preview |
||
60 | * |
||
61 | * @return $this |
||
62 | */ |
||
63 | public function setPreview($preview) |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function Preview() |
||
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | * |
||
81 | * @param array $properties |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function Field($properties = array()) |
||
94 | |||
95 | public function Type() |
||
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | * |
||
103 | * @param mixed $request |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | public function suggest($request) |
||
132 | |||
133 | /** |
||
134 | * @param SegmentFieldModifier $modifier |
||
135 | * @param mixed $form |
||
136 | * @param mixed $request |
||
137 | * |
||
138 | * @return $this |
||
139 | */ |
||
140 | protected function setModifierProperties(SegmentFieldModifier $modifier, $form, $request) |
||
154 | |||
155 | /** |
||
156 | * @param string $string The secondary text to show |
||
157 | * @return $this |
||
158 | */ |
||
159 | public function setHelpText($string) |
||
164 | |||
165 | /** |
||
166 | * @return string the secondary text to show in the template |
||
167 | */ |
||
168 | public function getHelpText() |
||
172 | } |
||
173 |