public function accordion($items = array(), $options = array()) {
		$defaults = array(
			'class' => '', 'id' => str_replace('.', '', uniqid('accordion_', true)),
		);
		$options = Hash::merge($defaults, $options);
		$options = $this->addClass($options, 'panel-group');

		if (is_array($items)) {
			$html = '';
			foreach ($items as $itemHeading => $itemBody) {
				$html .= $this->accordionItem($itemHeading, $itemBody, array('accordionId' => $options['id']));
			}
		} else {
			$html= $items;
		}

		return $this->tag('div', $html, $options);
	}
public function accordion($items = array(), $options = array()) {
		$defaults = array(
			'class' => '', 'id' => str_replace('.', '', uniqid('accordion_', true)),
		);
		$options = Hash::merge($defaults, $options);
		$options = $this->addClass($options, 'panel-group');

		if (is_array($items)) {
			$html = '';
			foreach ($items as $itemHeading => $itemBody) {
				$html .= $this->accordionItem($itemHeading, $itemBody, array('accordionId' => $options['id']));
			}
		} else {
			$html= $items;
		}

		return $this->tag('div', $html, $options);
	}
public function accordion ( $ items = array ( ) , $ options = array ( ) ) { $ defaults = array ( 'class' => '' , 'id' => str_replace ( '.' , '' , uniqid ( 'accordion_' , true ) ) , ) ; $ options = Hash :: merge ( $ defaults , $ options ) ; $ options = $ this -> addClass ( $ options , 'panel-group' ) ; if ( is_array ( $ items ) ) { $ html = '' ; foreach ( $ items as $ itemHeading => $ itemBody ) { $ html .= $ this -> accordionItem ( $ itemHeading , $ itemBody , array ( 'accordionId' => $ options [ 'id' ] ) ) ; } } else { $ html = $ items ; } return $ this -> tag ( 'div' , $ html , $ options ) ; }
Render an accordion

@param mixed $items
@param array $options
@return string
Render an accordion