public function end(array $divOptions = [])
    {
        $buffer = ob_get_contents();

        if (empty($buffer)) {
            return;
        }

        ob_end_clean();

        //Split all links
        if (preg_match_all('/(<a[^>]*>.*?<\/a[^>]*>)/', $buffer, $matches) === 0) {
            return;
        }

        $divOptions = optionsParser($divOptions)->append('class', 'dropdown-menu');

        return $this->_start . PHP_EOL . $this->Html->div($divOptions->get('class'), $matches[0], $divOptions->toArray());
    }