@@ 249-253 (lines=5) @@ | ||
246 | $type = 'Line'; |
|
247 | } |
|
248 | ||
249 | if (is_array($options)) { |
|
250 | $name = isset($options['name']) ? $options['name'] : null; |
|
251 | } else { |
|
252 | $name = $options; // backward compatibility |
|
253 | } |
|
254 | $name = preg_replace('|[^a-z0-9-_]|i', '_', $name); |
|
255 | ||
256 | if ($caption === null) { |
|
@@ 262-266 (lines=5) @@ | ||
259 | ||
260 | /* normalzie name and put name back in options array */ |
|
261 | $name = $this->app->normalizeName($name); |
|
262 | if (is_array($options)) { |
|
263 | $options['name'] = $name; |
|
264 | } else { |
|
265 | $options = array('name' => $name); |
|
266 | } |
|
267 | ||
268 | $map = array( |
|
269 | 'dropdown' => 'DropDown', |