+ $items = $this->getItems();
+ $tag = $this->tag();
+
+ $attrs = array('class' => 'nav');
+
+ if (!is_null($tag)) {
+ $attrs['id'] = 'nav_' . $tag;
+ }
+
+ if (Event::handle('StartNav', array($this, &$tag, &$items))) {
+
+ $this->out->elementStart('ul', $attrs);
+
+ foreach ($items as $item) {
+ assert(is_array($item));
+ assert(count($item) == 5);
+
+ list($actionName, $args, $label, $description, $id) = $item;
+
+ $this->item($actionName, $args, $label, $description, $id);
+ }
+
+ $this->out->elementEnd('ul');
+
+ Event::handle('EndNav', array($this, $tag, $items));
+ }