public function addMenuActions()
 {
     if (count($this->menuactions_items) > 0) {
         /**
          * Fill to move menuactions button to the right
          */
         new afExtjsToolbarFill($this, array("moreaction" => true));
         $menuactions_button = new afExtjsToolbarButton($this, array('label' => 'More Actions'));
         $menuactions_menu = new afExtjsToolbarMenu($menuactions_button);
         foreach ($this->menuactions_items as $attributes) {
             $item = new afExtjsToolbarMenuItem($menuactions_menu, $attributes);
             $item->end();
         }
         $menuactions_menu->end();
         $menuactions_button->end();
     }
 }
<?php

$toolbar = new afExtjsToolbar();
$dashboard = new afExtjsToolbarButton($toolbar, array('label' => '<img src="/images/famfamfam/house_go.png" border="0">', 'url' => '/pages/dashboard', 'tooltip' => array('text' => 'Your overview', 'title' => 'Project Dashboard')));
$dashboard->end();
/**
 * Fill
 */
new afExtjsToolbarFill($toolbar);
$logout_button = new afExtjsToolbarButton($toolbar, array('label' => '<img src="/images/famfamfam/user_go.png" border="0">', 'url' => '/logout', 'tooltip' => array('text' => 'Click to log out', 'title' => sfContext::getInstance()->getUser()->getUsername())));
$logout_button->end();
$toolbar->end();