Exemplo n.º 1
0
 public function addSpellingLink(Suggestion $spelling = null)
 {
     if ($spelling == null) {
         return;
     }
     // link to corrected spelling
     if ($spelling->hasSuggestions()) {
         $term = $spelling->getTerm(0);
         $params = $this->currentParams();
         $params["field"] = $term->field;
         $params["query"] = $term->phrase;
         $spelling->url = $this->request->url_for($params);
     }
 }