Added search term filtering to short codes list

This commit is contained in:
Alejandro Celaya
2016-10-22 12:40:51 +02:00
parent 4c76e17178
commit 543c0e62d0
6 changed files with 59 additions and 26 deletions

View File

@@ -13,18 +13,18 @@ class PaginableRepositoryAdapter implements AdapterInterface
*/
private $paginableRepository;
/**
* @var null
* @var null|string
*/
private $searchTerm;
/**
* @var null
* @var null|array|string
*/
private $orderBy;
public function __construct(PaginableRepositoryInterface $paginableRepository, $searchTerm = null, $orderBy = null)
public function __construct(PaginableRepositoryInterface $paginableRepository, $searchQuery = null, $orderBy = null)
{
$this->paginableRepository = $paginableRepository;
$this->searchTerm = $searchTerm;
$this->searchTerm = trim(strip_tags($searchQuery));
$this->orderBy = $orderBy;
}