/**
  * Prepare controller
  */
 function __before()
 {
     parent::__before();
     $this->wireframe->tabs->clear();
     $this->wireframe->tabs->add('calendar', lang('Timer'), TimerModule::getTimerRoute(), null, true);
     // Custom event
     EventsManager::trigger('on_timer_tabs', array(&$this->wireframe->tabs, &$this->logged_user));
     // set wireframe
     $this->wireframe->breadcrumbs->add('timer', lang('Timer'), TimerModule::getTimerRoute());
     $this->wireframe->setCurrentMenuItem('timer');
     $this->wireframe->actions->clear();
     // assign template variable
     $this->smarty->assign('api_url', ROOT_URL . '/api.php?format=json&auth_api_token=1-HQVcG1x3xfSNIMypMkDsAVT8W670QwGwhI387Tta');
     $this->smarty->assign('user_id', ROOT_URL . '1');
 }
/**
 * Add options to Home Screen
 *
 * @param NamedList $menu
 * @param User $user
 */
function timer_handle_on_phone_homescreen(NamedList &$items, IUser &$user)
{
    $items->add('timer', array('text' => lang('Timer'), 'url' => TimerModule::getTimerRoute(), 'icon' => AngieApplication::getImageUrl('module.png', TIMER_MODULE, AngieApplication::INTERFACE_PHONE)));
}
/**
 * Add options to main menu
 *
 * @param MainMenu $menu
 * @param User $user
 */
function timer_handle_on_main_menu(MainMenu &$menu, User &$user)
{
    $menu->addBefore('timer', lang('Timer'), TimerModule::getTimerRoute(), AngieApplication::getImageUrl('module.png', TIMER_MODULE, AngieApplication::INTERFACE_DEFAULT), null, 'admin');
    // before admin
}