-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SearchEngine): Added
DocumentSearchQueryEvent
and `NodeSourceS…
…earchQueryEvent` event to alter Solr select queries
- Loading branch information
1 parent
51a25ec
commit 083d2e5
Showing
11 changed files
with
421 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
lib/RoadizCoreBundle/src/SearchEngine/Event/AbstractSearchQueryEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RZ\Roadiz\CoreBundle\SearchEngine\Event; | ||
|
||
use Solarium\QueryType\Select\Query\Query; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
abstract class AbstractSearchQueryEvent extends Event | ||
{ | ||
private Query $query; | ||
private array $args; | ||
|
||
public function __construct(Query $query, array $args) | ||
{ | ||
$this->query = $query; | ||
$this->args = $args; | ||
} | ||
|
||
/** | ||
* @return Query | ||
*/ | ||
public function getQuery(): Query | ||
{ | ||
return $this->query; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getArgs(): array | ||
{ | ||
return $this->args; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
lib/RoadizCoreBundle/src/SearchEngine/Event/DocumentSearchQueryEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RZ\Roadiz\CoreBundle\SearchEngine\Event; | ||
|
||
final class DocumentSearchQueryEvent extends AbstractSearchQueryEvent | ||
{ | ||
} |
9 changes: 9 additions & 0 deletions
9
lib/RoadizCoreBundle/src/SearchEngine/Event/NodeSourceSearchQueryEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace RZ\Roadiz\CoreBundle\SearchEngine\Event; | ||
|
||
final class NodeSourceSearchQueryEvent extends AbstractSearchQueryEvent | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.