FEATURE: add permissions into widgets and fix few bugs

This commit is contained in:
Michal Kváček
2017-08-24 01:54:58 +02:00
parent e0f5cba9a4
commit b35149ad67
23 changed files with 239 additions and 110 deletions
+7 -3
View File
@@ -13,7 +13,6 @@ class Search extends Controller
{
/**
* Create form for searching
*
* @return $this|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function getSearch()
@@ -37,7 +36,6 @@ class Search extends Controller
/**
* Method used for performing search.
*
* This method iterates over all registered search engines and returns results for each engine apart.
*
* @param string $term search text
@@ -60,10 +58,16 @@ class Search extends Controller
// try to find given term
$results = $search->search($term);
$content = $presenter->render($results);
if (is_null($content)) {
continue;
}
// create result object
$resultsParts[$search->getId()] = [
'name' => $search->getName(),
'content' => $presenter->render($results),
'content' => $content,
'count' => count($results)
];
}