74 parent::initializeArguments();
75 $this->registerArgument(
78 'CSS class to set if there are errors for this ViewHelper',
82 $this->registerArgument(
'checked',
'bool',
'Specifies that the input element should be preselected');
83 $this->overrideArgument(
'value',
'string',
'Value of input tag. Required for radio buttons',
true);
84 $this->registerUniversalTagAttributes();
85 $this->registerTagAttribute(
88 'Specifies that the input element should be disabled when the page loads'
99 $checked = $this->arguments[
'checked'];
101 $this->tag->addAttribute(
'type',
'radio');
106 $propertyValue =
null;
110 if ($checked ===
null && $propertyValue ===
null) {
115 if ($propertyValue !==
null) {
117 $checked = $propertyValue == $valueAttribute;
121 $this->tag->addAttribute(
'name', $nameAttribute);
122 $this->tag->addAttribute(
'value', $valueAttribute);
123 if ($checked ===
true) {
124 $this->tag->addAttribute(
'checked',
'checked');
129 return $this->tag->render();