original_string: public function get_sorted_plugins_list() {
          $names = core_component::get_plugin_list($this->subtype);
  
          $result = array();
  
          foreach ($names as $name => $path) {
              $idx = get_config($this->subtype . '_' . $name, 'sortorder');
              if (!$idx) {
                  $idx = 0;
              }
              while (array_key_exists($idx, $result)) {
                  $idx +=1;
              }
              $result[$idx] = $name;
          }
          ksort($result);
  
          return $result;
      }
code: public function get_sorted_plugins_list() {
          $names = core_component::get_plugin_list($this->subtype);
  
          $result = array();
  
          foreach ($names as $name => $path) {
              $idx = get_config($this->subtype . '_' . $name, 'sortorder');
              if (!$idx) {
                  $idx = 0;
              }
              while (array_key_exists($idx, $result)) {
                  $idx +=1;
              }
              $result[$idx] = $name;
          }
          ksort($result);
  
          return $result;
      }
code_tokens: public function get_sorted_plugins_list ( ) { $ names = core_component :: get_plugin_list ( $ this -> subtype ) ; $ result = array ( ) ; foreach ( $ names as $ name => $ path ) { $ idx = get_config ( $ this -> subtype . '_' . $ name , 'sortorder' ) ; if ( ! $ idx ) { $ idx = 0 ; } while ( array_key_exists ( $ idx , $ result ) ) { $ idx += 1 ; } $ result [ $ idx ] = $ name ; } ksort ( $ result ) ; return $ result ; }
docstring: Return a list of plugins sorted by the order defined in the admin interface
  
  @return array The list of plugins
docstring_tokens: Return a list of plugins sorted by the order defined in the admin interface