original_string: private function buildMenuItem($menuName, $subMenuName, $url, $order = 50, $tooltip = false, $icon = false, $onclick = false)
      {
          if (!isset($this->menu[$menuName])) {
              $this->menu[$menuName] = array(
                  '_hasSubmenu' => false,
                  '_order' => $order
              );
          }
  
          if (empty($subMenuName)) {
              $this->menu[$menuName]['_url']   = $url;
              $this->menu[$menuName]['_order'] = $order;
              $this->menu[$menuName]['_name']  = $menuName;
              $this->menu[$menuName]['_tooltip'] = $tooltip;
              if (!empty($this->menuIcons[$menuName])) {
                  $this->menu[$menuName]['_icon'] = $this->menuIcons[$menuName];
              } else {
                  $this->menu[$menuName]['_icon'] = '';
              }
          }
          if (!empty($subMenuName)) {
              $this->menu[$menuName][$subMenuName]['_url'] = $url;
              $this->menu[$menuName][$subMenuName]['_order'] = $order;
              $this->menu[$menuName][$subMenuName]['_name'] = $subMenuName;
              $this->menu[$menuName][$subMenuName]['_tooltip'] = $tooltip;
              $this->menu[$menuName][$subMenuName]['_icon'] = $icon;
              $this->menu[$menuName][$subMenuName]['_onclick'] = $onclick;
              $this->menu[$menuName]['_hasSubmenu'] = true;
  
              if (!array_key_exists('_tooltip', $this->menu[$menuName])) {
                  $this->menu[$menuName]['_tooltip'] = $tooltip;
              }
          }
      }
code: private function buildMenuItem($menuName, $subMenuName, $url, $order = 50, $tooltip = false, $icon = false, $onclick = false)
      {
          if (!isset($this->menu[$menuName])) {
              $this->menu[$menuName] = array(
                  '_hasSubmenu' => false,
                  '_order' => $order
              );
          }
  
          if (empty($subMenuName)) {
              $this->menu[$menuName]['_url']   = $url;
              $this->menu[$menuName]['_order'] = $order;
              $this->menu[$menuName]['_name']  = $menuName;
              $this->menu[$menuName]['_tooltip'] = $tooltip;
              if (!empty($this->menuIcons[$menuName])) {
                  $this->menu[$menuName]['_icon'] = $this->menuIcons[$menuName];
              } else {
                  $this->menu[$menuName]['_icon'] = '';
              }
          }
          if (!empty($subMenuName)) {
              $this->menu[$menuName][$subMenuName]['_url'] = $url;
              $this->menu[$menuName][$subMenuName]['_order'] = $order;
              $this->menu[$menuName][$subMenuName]['_name'] = $subMenuName;
              $this->menu[$menuName][$subMenuName]['_tooltip'] = $tooltip;
              $this->menu[$menuName][$subMenuName]['_icon'] = $icon;
              $this->menu[$menuName][$subMenuName]['_onclick'] = $onclick;
              $this->menu[$menuName]['_hasSubmenu'] = true;
  
              if (!array_key_exists('_tooltip', $this->menu[$menuName])) {
                  $this->menu[$menuName]['_tooltip'] = $tooltip;
              }
          }
      }
code_tokens: private function buildMenuItem ( $ menuName , $ subMenuName , $ url , $ order = 50 , $ tooltip = false , $ icon = false , $ onclick = false ) { if ( ! isset ( $ this -> menu [ $ menuName ] ) ) { $ this -> menu [ $ menuName ] = array ( '_hasSubmenu' => false , '_order' => $ order ) ; } if ( empty ( $ subMenuName ) ) { $ this -> menu [ $ menuName ] [ '_url' ] = $ url ; $ this -> menu [ $ menuName ] [ '_order' ] = $ order ; $ this -> menu [ $ menuName ] [ '_name' ] = $ menuName ; $ this -> menu [ $ menuName ] [ '_tooltip' ] = $ tooltip ; if ( ! empty ( $ this -> menuIcons [ $ menuName ] ) ) { $ this -> menu [ $ menuName ] [ '_icon' ] = $ this -> menuIcons [ $ menuName ] ; } else { $ this -> menu [ $ menuName ] [ '_icon' ] = '' ; } } if ( ! empty ( $ subMenuName ) ) { $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_url' ] = $ url ; $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_order' ] = $ order ; $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_name' ] = $ subMenuName ; $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_tooltip' ] = $ tooltip ; $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_icon' ] = $ icon ; $ this -> menu [ $ menuName ] [ $ subMenuName ] [ '_onclick' ] = $ onclick ; $ this -> menu [ $ menuName ] [ '_hasSubmenu' ] = true ; if ( ! array_key_exists ( '_tooltip' , $ this -> menu [ $ menuName ] ) ) { $ this -> menu [ $ menuName ] [ '_tooltip' ] = $ tooltip ; } } }
docstring: Builds a single menu item
  
  @param string $menuName
  @param string $subMenuName
  @param string $url
  @param int $order
  @param bool|string $tooltip Tooltip to display.
docstring_tokens: Builds a single menu item