original_string: public function search($query) {
          if ($result = parent::search($query)) {
              return $result;
          }
  
          $found = false;
  
          foreach (core_component::get_plugin_list($this->subtype) as $name => $notused) {
              if (strpos(core_text::strtolower(get_string('pluginname', $this->subtype . '_' . $name)),
                      $query) !== false) {
                  $found = true;
                  break;
              }
          }
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = array();
              return array($this->name => $result);
          } else {
              return array();
          }
      }
code: public function search($query) {
          if ($result = parent::search($query)) {
              return $result;
          }
  
          $found = false;
  
          foreach (core_component::get_plugin_list($this->subtype) as $name => $notused) {
              if (strpos(core_text::strtolower(get_string('pluginname', $this->subtype . '_' . $name)),
                      $query) !== false) {
                  $found = true;
                  break;
              }
          }
          if ($found) {
              $result = new stdClass();
              $result->page     = $this;
              $result->settings = array();
              return array($this->name => $result);
          } else {
              return array();
          }
      }
code_tokens: public function search ( $ query ) { if ( $ result = parent :: search ( $ query ) ) { return $ result ; } $ found = false ; foreach ( core_component :: get_plugin_list ( $ this -> subtype ) as $ name => $ notused ) { if ( strpos ( core_text :: strtolower ( get_string ( 'pluginname' , $ this -> subtype . '_' . $ name ) ) , $ query ) !== false ) { $ found = true ; break ; } } if ( $ found ) { $ result = new stdClass ( ) ; $ result -> page = $ this ; $ result -> settings = array ( ) ; return array ( $ this -> name => $ result ) ; } else { return array ( ) ; } }
docstring: Search plugins for the specified string
  
  @param string $query The string to search for
  @return array
docstring_tokens: Search plugins for the specified string