original_string: public static function get_collections_menu($unlockedonly = false, $onlysearchable = false,
              $selectalllabel = null) {
          $tagcolls = self::get_collections($onlysearchable);
          $options = array();
          foreach ($tagcolls as $id => $tagcoll) {
              if (!$unlockedonly || empty($tagcoll->component)) {
                  $options[$id] = self::display_name($tagcoll);
              }
          }
          if (count($options) > 1 && $selectalllabel) {
              $options = array(0 => $selectalllabel) + $options;
          }
          return $options;
      }
code: public static function get_collections_menu($unlockedonly = false, $onlysearchable = false,
              $selectalllabel = null) {
          $tagcolls = self::get_collections($onlysearchable);
          $options = array();
          foreach ($tagcolls as $id => $tagcoll) {
              if (!$unlockedonly || empty($tagcoll->component)) {
                  $options[$id] = self::display_name($tagcoll);
              }
          }
          if (count($options) > 1 && $selectalllabel) {
              $options = array(0 => $selectalllabel) + $options;
          }
          return $options;
      }
code_tokens: public static function get_collections_menu ( $ unlockedonly = false , $ onlysearchable = false , $ selectalllabel = null ) { $ tagcolls = self :: get_collections ( $ onlysearchable ) ; $ options = array ( ) ; foreach ( $ tagcolls as $ id => $ tagcoll ) { if ( ! $ unlockedonly || empty ( $ tagcoll -> component ) ) { $ options [ $ id ] = self :: display_name ( $ tagcoll ) ; } } if ( count ( $ options ) > 1 && $ selectalllabel ) { $ options = array ( 0 => $ selectalllabel ) + $ options ; } return $ options ; }
docstring: Returns the list of existing tag collections as id=>name
  
  @param bool $unlockedonly
  @param bool $onlysearchable
  @param string $selectalllabel
  @return array
docstring_tokens: Returns the list of existing tag collections as id = > name