original_string: public static function get_default_mode_stores() {
          global $OUTPUT;
          $instance = cache_config::instance();
          $adequatestores = cache_helper::get_stores_suitable_for_mode_default();
          $icon = new pix_icon('i/warning', new lang_string('inadequatestoreformapping', 'cache'));
          $storenames = array();
          foreach ($instance->get_all_stores() as $key => $store) {
              if (!empty($store['default'])) {
                  $storenames[$key] = new lang_string('store_'.$key, 'cache');
              }
          }
          $modemappings = array(
              cache_store::MODE_APPLICATION => array(),
              cache_store::MODE_SESSION => array(),
              cache_store::MODE_REQUEST => array(),
          );
          foreach ($instance->get_mode_mappings() as $mapping) {
              $mode = $mapping['mode'];
              if (!array_key_exists($mode, $modemappings)) {
                  debugging('Unknown mode in cache store mode mappings', DEBUG_DEVELOPER);
                  continue;
              }
              if (array_key_exists($mapping['store'], $storenames)) {
                  $modemappings[$mode][$mapping['store']] = $storenames[$mapping['store']];
              } else {
                  $modemappings[$mode][$mapping['store']] = $mapping['store'];
              }
              if (!array_key_exists($mapping['store'], $adequatestores)) {
                  $modemappings[$mode][$mapping['store']] = $modemappings[$mode][$mapping['store']].' '.$OUTPUT->render($icon);
              }
          }
          return $modemappings;
      }
code: public static function get_default_mode_stores() {
          global $OUTPUT;
          $instance = cache_config::instance();
          $adequatestores = cache_helper::get_stores_suitable_for_mode_default();
          $icon = new pix_icon('i/warning', new lang_string('inadequatestoreformapping', 'cache'));
          $storenames = array();
          foreach ($instance->get_all_stores() as $key => $store) {
              if (!empty($store['default'])) {
                  $storenames[$key] = new lang_string('store_'.$key, 'cache');
              }
          }
          $modemappings = array(
              cache_store::MODE_APPLICATION => array(),
              cache_store::MODE_SESSION => array(),
              cache_store::MODE_REQUEST => array(),
          );
          foreach ($instance->get_mode_mappings() as $mapping) {
              $mode = $mapping['mode'];
              if (!array_key_exists($mode, $modemappings)) {
                  debugging('Unknown mode in cache store mode mappings', DEBUG_DEVELOPER);
                  continue;
              }
              if (array_key_exists($mapping['store'], $storenames)) {
                  $modemappings[$mode][$mapping['store']] = $storenames[$mapping['store']];
              } else {
                  $modemappings[$mode][$mapping['store']] = $mapping['store'];
              }
              if (!array_key_exists($mapping['store'], $adequatestores)) {
                  $modemappings[$mode][$mapping['store']] = $modemappings[$mode][$mapping['store']].' '.$OUTPUT->render($icon);
              }
          }
          return $modemappings;
      }
code_tokens: public static function get_default_mode_stores ( ) { global $ OUTPUT ; $ instance = cache_config :: instance ( ) ; $ adequatestores = cache_helper :: get_stores_suitable_for_mode_default ( ) ; $ icon = new pix_icon ( 'i/warning' , new lang_string ( 'inadequatestoreformapping' , 'cache' ) ) ; $ storenames = array ( ) ; foreach ( $ instance -> get_all_stores ( ) as $ key => $ store ) { if ( ! empty ( $ store [ 'default' ] ) ) { $ storenames [ $ key ] = new lang_string ( 'store_' . $ key , 'cache' ) ; } } $ modemappings = array ( cache_store :: MODE_APPLICATION => array ( ) , cache_store :: MODE_SESSION => array ( ) , cache_store :: MODE_REQUEST => array ( ) , ) ; foreach ( $ instance -> get_mode_mappings ( ) as $ mapping ) { $ mode = $ mapping [ 'mode' ] ; if ( ! array_key_exists ( $ mode , $ modemappings ) ) { debugging ( 'Unknown mode in cache store mode mappings' , DEBUG_DEVELOPER ) ; continue ; } if ( array_key_exists ( $ mapping [ 'store' ] , $ storenames ) ) { $ modemappings [ $ mode ] [ $ mapping [ 'store' ] ] = $ storenames [ $ mapping [ 'store' ] ] ; } else { $ modemappings [ $ mode ] [ $ mapping [ 'store' ] ] = $ mapping [ 'store' ] ; } if ( ! array_key_exists ( $ mapping [ 'store' ] , $ adequatestores ) ) { $ modemappings [ $ mode ] [ $ mapping [ 'store' ] ] = $ modemappings [ $ mode ] [ $ mapping [ 'store' ] ] . ' ' . $ OUTPUT -> render ( $ icon ) ; } } return $ modemappings ; }
docstring: Get the default stores for all modes.
  
  @return array An array containing sub-arrays, one for each mode.
docstring_tokens: Get the default stores for all modes .