public function generate()
    {
        $return = sprintf(
            '<fieldset id="ctrl_%s" class="checkbox_container">
',
            $this->strName
        );

        $count = 0;

        if ($this->options && is_array($this->options)) {
            if ($this->arrConfiguration['includeBlankOption']) {
                $return .= $this->generateOption(
                    array('value' => '--none--', 'label' => $this->arrConfiguration['blankOptionLabel']),
                    $count++
                );
            }

            // Select all tags.
            $return .= $this->generateOption(
                array('value' => '--all--', 'label' => $GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all']),
                $count++
            );

            foreach ($this->options as $val) {
                $return .= $this->generateOption($val, $count++);
            }
        } else {
            // Do not filter.
            if ($this->arrConfiguration['includeBlankOption']) {
                $return .= $this->generateOption(
                    array
                    (
                        'value' => '',
                        'label' => $this->arrConfiguration['blankOptionLabel'] .
                            '<span>' .
                            $GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] .
                            '</span>'
                    ),
                    $count
                );
            }
        }

        $return .= '</fieldset>';

        return $return;
    }
public function generate()
    {
        $return = sprintf(
            '<fieldset id="ctrl_%s" class="checkbox_container">
',
            $this->strName
        );

        $count = 0;

        if ($this->options && is_array($this->options)) {
            if ($this->arrConfiguration['includeBlankOption']) {
                $return .= $this->generateOption(
                    array('value' => '--none--', 'label' => $this->arrConfiguration['blankOptionLabel']),
                    $count++
                );
            }

            // Select all tags.
            $return .= $this->generateOption(
                array('value' => '--all--', 'label' => $GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all']),
                $count++
            );

            foreach ($this->options as $val) {
                $return .= $this->generateOption($val, $count++);
            }
        } else {
            // Do not filter.
            if ($this->arrConfiguration['includeBlankOption']) {
                $return .= $this->generateOption(
                    array
                    (
                        'value' => '',
                        'label' => $this->arrConfiguration['blankOptionLabel'] .
                            '<span>' .
                            $GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] .
                            '</span>'
                    ),
                    $count
                );
            }
        }

        $return .= '</fieldset>';

        return $return;
    }
{@inheritDoc}

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)