| @@ 69-78 (lines=10) @@ | ||
| 66 | * @param mixed $value Either one value as a string or an array of them. |
|
| 67 | * @param string $delimeter |
|
| 68 | */ |
|
| 69 | public function __construct($caption, $name, $value = null, $delimeter = ' ') |
|
| 70 | { |
|
| 71 | $this->setCaption($caption); |
|
| 72 | $this->setName($name); |
|
| 73 | if (isset($value)) { |
|
| 74 | $this->setValue($value); |
|
| 75 | } |
|
| 76 | $this->_delimeter = $delimeter; |
|
| 77 | $this->setFormType('checkbox'); |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Get the "value" |
|
| @@ 78-87 (lines=10) @@ | ||
| 75 | * @param int $size Number or rows. "1" makes a drop-down-list |
|
| 76 | * @param bool $multiple Allow multiple selections? |
|
| 77 | */ |
|
| 78 | public function __construct($caption, $name, $value = null, $size = 1, $multiple = false) |
|
| 79 | { |
|
| 80 | $this->setCaption($caption); |
|
| 81 | $this->setName($name); |
|
| 82 | $this->_multiple = $multiple; |
|
| 83 | $this->_size = (int)$size; |
|
| 84 | if (isset($value)) { |
|
| 85 | $this->setValue($value); |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * Are multiple selections allowed? |
|