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());
    }
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());
    }
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 ( ) ) ; }
End a buffered section of dropdown menu capturing.

Arguments and options regarding the list of the dropdown menu.
@param array $divOptions HTML attributes and options for the wrapper
element
@return string|void
@uses $_start
End a buffered section of dropdown menu capturing .