original_string: public function addItem($menuName, $subMenuName, $url, $order = 50, $tooltip = false, $icon = false, $onclick = false)
      {
          // make sure the idSite value used is numeric (hack-y fix for #3426)
          if (isset($url['idSite']) && !is_numeric($url['idSite'])) {
              $idSites = API::getInstance()->getSitesIdWithAtLeastViewAccess();
              $url['idSite'] = reset($idSites);
          }
  
          $this->menuEntries[] = array(
              $menuName,
              $subMenuName,
              $url,
              $order,
              $tooltip,
              $icon,
              $onclick
          );
      }
code: public function addItem($menuName, $subMenuName, $url, $order = 50, $tooltip = false, $icon = false, $onclick = false)
      {
          // make sure the idSite value used is numeric (hack-y fix for #3426)
          if (isset($url['idSite']) && !is_numeric($url['idSite'])) {
              $idSites = API::getInstance()->getSitesIdWithAtLeastViewAccess();
              $url['idSite'] = reset($idSites);
          }
  
          $this->menuEntries[] = array(
              $menuName,
              $subMenuName,
              $url,
              $order,
              $tooltip,
              $icon,
              $onclick
          );
      }
code_tokens: public function addItem ( $ menuName , $ subMenuName , $ url , $ order = 50 , $ tooltip = false , $ icon = false , $ onclick = false ) { // make sure the idSite value used is numeric (hack-y fix for #3426) if ( isset ( $ url [ 'idSite' ] ) && ! is_numeric ( $ url [ 'idSite' ] ) ) { $ idSites = API :: getInstance ( ) -> getSitesIdWithAtLeastViewAccess ( ) ; $ url [ 'idSite' ] = reset ( $ idSites ) ; } $ this -> menuEntries [ ] = array ( $ menuName , $ subMenuName , $ url , $ order , $ tooltip , $ icon , $ onclick ) ; }
docstring: Adds a new entry to the menu.
  
  @param string $menuName The menu's category name. Can be a translation token.
  @param string $subMenuName The menu item's name. Can be a translation token.
  @param string|array $url The URL the admin menu entry should link to, or an array of query parameters
  that can be used to build the URL.
  @param int $order The order hint.
  @param bool|string $tooltip An optional tooltip to display or false to display the tooltip.
  @param bool|string $icon An icon classname, such as "icon-add". Only supported by admin menu
  @param bool|string $onclick Will execute the on click handler instead of executing the link. Only supported by admin menu.
  @since 2.7.0
  @api
docstring_tokens: Adds a new entry to the menu .