original_string: public function list_restorable_archives() {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return false;
          }
  
          $codeman = $this->get_code_manager();
          $restorable = array();
          foreach ($this->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if ($this->can_cancel_plugin_upgrade($plugin)) {
                      $restorable[$plugin->component] = (object)array(
                          'component' => $plugin->component,
                          'zipfilepath' => $codeman->get_archived_plugin_version($plugin->component, $plugin->versiondb)
                      );
                  }
              }
          }
  
          return $restorable;
      }
code: public function list_restorable_archives() {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return false;
          }
  
          $codeman = $this->get_code_manager();
          $restorable = array();
          foreach ($this->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if ($this->can_cancel_plugin_upgrade($plugin)) {
                      $restorable[$plugin->component] = (object)array(
                          'component' => $plugin->component,
                          'zipfilepath' => $codeman->get_archived_plugin_version($plugin->component, $plugin->versiondb)
                      );
                  }
              }
          }
  
          return $restorable;
      }
code_tokens: public function list_restorable_archives ( ) { global $ CFG ; if ( ! empty ( $ CFG -> disableupdateautodeploy ) ) { return false ; } $ codeman = $ this -> get_code_manager ( ) ; $ restorable = array ( ) ; foreach ( $ this -> get_plugins ( ) as $ type => $ plugins ) { foreach ( $ plugins as $ plugin ) { if ( $ this -> can_cancel_plugin_upgrade ( $ plugin ) ) { $ restorable [ $ plugin -> component ] = ( object ) array ( 'component' => $ plugin -> component , 'zipfilepath' => $ codeman -> get_archived_plugin_version ( $ plugin -> component , $ plugin -> versiondb ) ) ; } } } return $ restorable ; }
docstring: Returns list of all archives that can be installed to cancel the plugin upgrade.
  
  @return array [(string)component] => {(string)->component, (string)->zipfilepath}
docstring_tokens: Returns list of all archives that can be installed to cancel the plugin upgrade .