original_string: public function list_cancellable_installations() {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return array();
          }
  
          $cancellable = array();
          foreach ($this->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if ($this->can_cancel_plugin_installation($plugin)) {
                      $cancellable[$plugin->component] = $plugin;
                  }
              }
          }
  
          return $cancellable;
      }
code: public function list_cancellable_installations() {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return array();
          }
  
          $cancellable = array();
          foreach ($this->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if ($this->can_cancel_plugin_installation($plugin)) {
                      $cancellable[$plugin->component] = $plugin;
                  }
              }
          }
  
          return $cancellable;
      }
code_tokens: public function list_cancellable_installations ( ) { global $ CFG ; if ( ! empty ( $ CFG -> disableupdateautodeploy ) ) { return array ( ) ; } $ cancellable = array ( ) ; foreach ( $ this -> get_plugins ( ) as $ type => $ plugins ) { foreach ( $ plugins as $ plugin ) { if ( $ this -> can_cancel_plugin_installation ( $ plugin ) ) { $ cancellable [ $ plugin -> component ] = $ plugin ; } } } return $ cancellable ; }
docstring: Returns plugins, the installation of which can be cancelled.
  
  @return array [(string)component] => (\core\plugininfo\base)plugin
docstring_tokens: Returns plugins the installation of which can be cancelled .