[COMPONENT][CONTROLLER][Search][CORE][FeedController] Use new FeedController base class

This commit is contained in:
Hugo Sales 2021-12-07 21:07:37 +00:00
parent 4c0210fb00
commit ba87944732
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -23,14 +23,14 @@ declare(strict_types = 1);
namespace Component\Search\Controller; namespace Component\Search\Controller;
use App\Core\Controller; use App\Core\Controller\FeedController;
use App\Core\DB\DB; use App\Core\DB\DB;
use App\Core\Event; use App\Core\Event;
use App\Util\Common; use App\Util\Common;
use Component\Search\Util\Parser; use Component\Search\Util\Parser;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
class Search extends Controller class Search extends FeedController
{ {
/** /**
* Handle a search query * Handle a search query
@ -56,12 +56,12 @@ class Search extends Controller
$actors = $actor_qb->getQuery()->execute(); $actors = $actor_qb->getQuery()->execute();
} }
return [ return $this->process_feed([
'_template' => 'search/show.html.twig', '_template' => 'search/show.html.twig',
'query' => $q, 'query' => $q,
'notes' => $notes, 'notes' => $notes,
'actors' => $actors, 'actors' => $actors,
'page' => 1, // TODO paginate 'page' => 1, // TODO paginate
]; ]);
} }
} }