Neos\FluidAdaptor\ViewHelpers\Form\SelectViewHelper::renderOptionTags PHP Method

renderOptionTags() protected method

Render the option tags.
protected renderOptionTags ( array $options ) : string
$options array the options for the form.
return string rendered tags.
    protected function renderOptionTags($options)
    {
        $output = '';
        if ($this->hasArgument('prependOptionLabel')) {
            $value = $this->hasArgument('prependOptionValue') ? $this->arguments['prependOptionValue'] : '';
            if ($this->hasArgument('translate')) {
                $label = $this->getTranslatedLabel($value, $this->arguments['prependOptionLabel']);
            } else {
                $label = $this->arguments['prependOptionLabel'];
            }
            $output .= $this->renderOptionTag($value, $label) . chr(10);
        } elseif (empty($options)) {
            $options = array('' => '');
        }
        foreach ($options as $value => $label) {
            $output .= $this->renderOptionTag($value, $label) . chr(10);
        }
        return $output;
    }