FluidTYPO3\Vhs\ViewHelpers\Form\SelectViewHelper::renderOptionTag PHP Méthode

renderOptionTag() protected méthode

Render one option tag
protected renderOptionTag ( string $value, string $label, boolean $isSelected ) : string
$value string value attribute of the option tag (will be escaped)
$label string content of the option tag (will be escaped)
$isSelected boolean specifies wheter or not to add selected attribute
Résultat string the rendered option tag
    protected function renderOptionTag($value, $label, $isSelected)
    {
        $output = '<option value="' . htmlspecialchars($value) . '"';
        if (true === (bool) $isSelected) {
            $output .= ' selected="selected"';
        }
        $output .= '>' . htmlspecialchars($label) . '</option>';
        return $output;
    }