original_string: protected static function get_browse_modes_from_display_format($format) {
          global $DB;
  
          $formats = array();
          $dp = $DB->get_record('glossary_formats', array('name' => $format), '*', IGNORE_MISSING);
          if ($dp) {
              $formats = glossary_get_visible_tabs($dp);
          }
  
          // Always add 'letter'.
          $modes = array('letter');
  
          if (in_array('category', $formats)) {
              $modes[] = 'cat';
          }
          if (in_array('date', $formats)) {
              $modes[] = 'date';
          }
          if (in_array('author', $formats)) {
              $modes[] = 'author';
          }
  
          return $modes;
      }
code: protected static function get_browse_modes_from_display_format($format) {
          global $DB;
  
          $formats = array();
          $dp = $DB->get_record('glossary_formats', array('name' => $format), '*', IGNORE_MISSING);
          if ($dp) {
              $formats = glossary_get_visible_tabs($dp);
          }
  
          // Always add 'letter'.
          $modes = array('letter');
  
          if (in_array('category', $formats)) {
              $modes[] = 'cat';
          }
          if (in_array('date', $formats)) {
              $modes[] = 'date';
          }
          if (in_array('author', $formats)) {
              $modes[] = 'author';
          }
  
          return $modes;
      }
code_tokens: protected static function get_browse_modes_from_display_format ( $ format ) { global $ DB ; $ formats = array ( ) ; $ dp = $ DB -> get_record ( 'glossary_formats' , array ( 'name' => $ format ) , '*' , IGNORE_MISSING ) ; if ( $ dp ) { $ formats = glossary_get_visible_tabs ( $ dp ) ; } // Always add 'letter'. $ modes = array ( 'letter' ) ; if ( in_array ( 'category' , $ formats ) ) { $ modes [ ] = 'cat' ; } if ( in_array ( 'date' , $ formats ) ) { $ modes [ ] = 'date' ; } if ( in_array ( 'author' , $ formats ) ) { $ modes [ ] = 'author' ; } return $ modes ; }
docstring: Get the browse modes from the display format.
  
  This returns some of the terms that can be used when reporting a glossary being viewed.
  
  @param  string $format The display format of the glossary.
  @return array Containing some of all of the following: letter, cat, date, author.
docstring_tokens: Get the browse modes from the display format .