searchDataProvider = $searchDataProvider; $this->query = $queryFactory->get(); $this->title = $title; parent::__construct($context, $data); } /** * {@inheritdoc} */ public function getItems() { return $this->searchDataProvider->getItems($this->query); } /** * {@inheritdoc} */ public function isShowResultsCount() { return $this->searchDataProvider->isResultsCountEnabled(); } /** * {@inheritdoc} */ public function getLink($queryText) { return $this->getUrl('*/*/') . '?q=' . urlencode($queryText); } /** * {@inheritdoc} */ public function getTitle() { return __($this->title); } }