original_string: public function filter_installable($remoteinfos) {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return array();
          }
          if (empty($remoteinfos)) {
              return array();
          }
          $installable = array();
          foreach ($remoteinfos as $index => $remoteinfo) {
              if ($this->is_remote_plugin_installable($remoteinfo->component, $remoteinfo->version->version)) {
                  $installable[$index] = $remoteinfo;
              }
          }
          return $installable;
      }
code: public function filter_installable($remoteinfos) {
          global $CFG;
  
          if (!empty($CFG->disableupdateautodeploy)) {
              return array();
          }
          if (empty($remoteinfos)) {
              return array();
          }
          $installable = array();
          foreach ($remoteinfos as $index => $remoteinfo) {
              if ($this->is_remote_plugin_installable($remoteinfo->component, $remoteinfo->version->version)) {
                  $installable[$index] = $remoteinfo;
              }
          }
          return $installable;
      }
code_tokens: public function filter_installable ( $ remoteinfos ) { global $ CFG ; if ( ! empty ( $ CFG -> disableupdateautodeploy ) ) { return array ( ) ; } if ( empty ( $ remoteinfos ) ) { return array ( ) ; } $ installable = array ( ) ; foreach ( $ remoteinfos as $ index => $ remoteinfo ) { if ( $ this -> is_remote_plugin_installable ( $ remoteinfo -> component , $ remoteinfo -> version -> version ) ) { $ installable [ $ index ] = $ remoteinfo ; } } return $ installable ; }
docstring: Given the list of remote plugin infos, return just those installable.
  
  This is typically used on lists returned by
  {@link self::available_updates()} or {@link self::missing_dependencies()}
  to perform bulk installation of remote plugins.
  
  @param array $remoteinfos list of {@link \core\update\remote_info}
  @return array
docstring_tokens: Given the list of remote plugin infos return just those installable .