original_string: public static function get_definition_summaries() {
          $factory = cache_factory::instance();
          $config = $factory->create_config_instance();
          $storenames = array();
          foreach ($config->get_all_stores() as $key => $store) {
              if (!empty($store['default'])) {
                  $storenames[$key] = new lang_string('store_'.$key, 'cache');
              } else {
                  $storenames[$store['name']] = $store['name'];
              }
          }
          /* @var cache_definition[] $definitions */
          $definitions = array();
          foreach ($config->get_definitions() as $key => $definition) {
              $definitions[$key] = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
          }
          foreach ($definitions as $id => $definition) {
              $mappings = array();
              foreach (cache_helper::get_stores_suitable_for_definition($definition) as $store) {
                  $mappings[] = $storenames[$store->my_name()];
              }
              $return[$id] = array(
                  'id' => $id,
                  'name' => $definition->get_name(),
                  'mode' => $definition->get_mode(),
                  'component' => $definition->get_component(),
                  'area' => $definition->get_area(),
                  'mappings' => $mappings,
                  'canuselocalstore' => $definition->can_use_localstore(),
                  'sharingoptions' => self::get_definition_sharing_options($definition->get_sharing_options(), false),
                  'selectedsharingoption' => self::get_definition_sharing_options($definition->get_selected_sharing_option(), true),
                  'userinputsharingkey' => $definition->get_user_input_sharing_key()
              );
          }
          return $return;
      }
code: public static function get_definition_summaries() {
          $factory = cache_factory::instance();
          $config = $factory->create_config_instance();
          $storenames = array();
          foreach ($config->get_all_stores() as $key => $store) {
              if (!empty($store['default'])) {
                  $storenames[$key] = new lang_string('store_'.$key, 'cache');
              } else {
                  $storenames[$store['name']] = $store['name'];
              }
          }
          /* @var cache_definition[] $definitions */
          $definitions = array();
          foreach ($config->get_definitions() as $key => $definition) {
              $definitions[$key] = cache_definition::load($definition['component'].'/'.$definition['area'], $definition);
          }
          foreach ($definitions as $id => $definition) {
              $mappings = array();
              foreach (cache_helper::get_stores_suitable_for_definition($definition) as $store) {
                  $mappings[] = $storenames[$store->my_name()];
              }
              $return[$id] = array(
                  'id' => $id,
                  'name' => $definition->get_name(),
                  'mode' => $definition->get_mode(),
                  'component' => $definition->get_component(),
                  'area' => $definition->get_area(),
                  'mappings' => $mappings,
                  'canuselocalstore' => $definition->can_use_localstore(),
                  'sharingoptions' => self::get_definition_sharing_options($definition->get_sharing_options(), false),
                  'selectedsharingoption' => self::get_definition_sharing_options($definition->get_selected_sharing_option(), true),
                  'userinputsharingkey' => $definition->get_user_input_sharing_key()
              );
          }
          return $return;
      }
code_tokens: public static function get_definition_summaries ( ) { $ factory = cache_factory :: instance ( ) ; $ config = $ factory -> create_config_instance ( ) ; $ storenames = array ( ) ; foreach ( $ config -> get_all_stores ( ) as $ key => $ store ) { if ( ! empty ( $ store [ 'default' ] ) ) { $ storenames [ $ key ] = new lang_string ( 'store_' . $ key , 'cache' ) ; } else { $ storenames [ $ store [ 'name' ] ] = $ store [ 'name' ] ; } } /* @var cache_definition[] $definitions */ $ definitions = array ( ) ; foreach ( $ config -> get_definitions ( ) as $ key => $ definition ) { $ definitions [ $ key ] = cache_definition :: load ( $ definition [ 'component' ] . '/' . $ definition [ 'area' ] , $ definition ) ; } foreach ( $ definitions as $ id => $ definition ) { $ mappings = array ( ) ; foreach ( cache_helper :: get_stores_suitable_for_definition ( $ definition ) as $ store ) { $ mappings [ ] = $ storenames [ $ store -> my_name ( ) ] ; } $ return [ $ id ] = array ( 'id' => $ id , 'name' => $ definition -> get_name ( ) , 'mode' => $ definition -> get_mode ( ) , 'component' => $ definition -> get_component ( ) , 'area' => $ definition -> get_area ( ) , 'mappings' => $ mappings , 'canuselocalstore' => $ definition -> can_use_localstore ( ) , 'sharingoptions' => self :: get_definition_sharing_options ( $ definition -> get_sharing_options ( ) , false ) , 'selectedsharingoption' => self :: get_definition_sharing_options ( $ definition -> get_selected_sharing_option ( ) , true ) , 'userinputsharingkey' => $ definition -> get_user_input_sharing_key ( ) ) ; } return $ return ; }
docstring: Returns an array about the definitions. All the information a renderer needs.
  @return array
docstring_tokens: Returns an array about the definitions . All the information a renderer needs .