src/Viserio/Component/Profiler/DataCollector/AbstractDataCollector.php
protected function createDropdownMenuContent(array $data): string
    {
        $selects  = $content  = [];
        $selected = false;

        foreach ($data as $key => $value) {
            $id = 'content-' . $key . '-' . \uniqid('', true);

            $selected = $selected === false ? $selected = 'selected' : '';

            $selects[$key] = '<option value="' . $id . '"' . $selected . '>' . $key . '</option>';
            $content[$key] = '<div id="' . $id . '" class="selected-content">' . $value . '</div>';
        }

        $html = '<select class="content-selector" name="' . $this->getName() . '">';

        foreach ($selects as $key => $value) {
            $html .= $value;
        }

        $html .= '</select>';

        foreach ($content as $key => $value) {
            $html .= $value;
        }

        return $html;
    }
protected function createDropdownMenuContent(array $data): string
    {
        $selects  = $content  = [];
        $selected = false;

        foreach ($data as $key => $value) {
            $id = 'content-' . $key . '-' . \uniqid('', true);

            $selected = $selected === false ? $selected = 'selected' : '';

            $selects[$key] = '<option value="' . $id . '"' . $selected . '>' . $key . '</option>';
            $content[$key] = '<div id="' . $id . '" class="selected-content">' . $value . '</div>';
        }

        $html = '<select class="content-selector" name="' . $this->getName() . '">';

        foreach ($selects as $key => $value) {
            $html .= $value;
        }

        $html .= '</select>';

        foreach ($content as $key => $value) {
            $html .= $value;
        }

        return $html;
    }
Create a dropdown menu content.

@param array $data

@return string