Commit | Line | Data |
---|---|---|
158bd3ca | 1 | <?php |
a9229942 | 2 | |
158bd3ca | 3 | namespace wcf\system\form\element; |
a9229942 | 4 | |
59d502e6 | 5 | use wcf\system\form\container\SingleSelectionFormElementContainer; |
158bd3ca TD |
6 | |
7 | /** | |
d55936a7 | 8 | * Provides a radio form element. |
a9229942 TD |
9 | * |
10 | * @author Alexander Ebert | |
11 | * @copyright 2001-2019 WoltLab GmbH | |
12 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | |
a9229942 TD |
13 | * |
14 | * @method SingleSelectionFormElementContainer getParent() | |
158bd3ca | 15 | */ |
a9229942 TD |
16 | class SingleSelectionFormElement extends AbstractNamedFormElement |
17 | { | |
18 | /** | |
19 | * @inheritDoc | |
20 | */ | |
21 | public function getHTML($formName) | |
22 | { | |
23 | return <<<HTML | |
e5f9b56c | 24 | <label><input type="radio" name="{$formName}{$this->getParent()->getName()}" value="{$this->getValue()}"> {$this->getLabel()}</label> |
158bd3ca | 25 | HTML; |
a9229942 | 26 | } |
dcb3a44c | 27 | } |