-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update-related-products' into v4.2.0-beta
- Loading branch information
Showing
15 changed files
with
188 additions
and
92 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
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,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Valantic\ElasticaBridgeBundle\Enum; | ||
|
||
enum Operation: int | ||
{ | ||
case NOTHING = 0; | ||
case DELETE = 1; | ||
case INSERT = 2; | ||
case UPDATE = 3; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Valantic\ElasticaBridgeBundle\Model\Event; | ||
|
||
interface ElasticaBridgeEvents | ||
{ | ||
public const POST_REFRESH_ELEMENT_IN_INDEX = 'valantic.elastica_bridge.post_refreshed_element_in_index'; | ||
public const PRE_REFRESH_ELEMENT_IN_INDEX = 'valantic.elastica_bridge.pre_refreshed_element_in_index'; | ||
public const POST_REFRESH_ELEMENT = 'valantic.elastica_bridge.post_refreshed_element'; | ||
public const PRE_REFRESH_ELEMENT = 'valantic.elastica_bridge.pre_refreshed_element'; | ||
} |
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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Valantic\ElasticaBridgeBundle\Model\Event; | ||
|
||
use Pimcore\Model\Element\AbstractElement; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
use Valantic\ElasticaBridgeBundle\Index\IndexInterface; | ||
|
||
class RefreshedElementEvent extends Event | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* @param array<IndexInterface> $indices | ||
*/ | ||
public function __construct( | ||
private readonly AbstractElement $element, | ||
private readonly array $indices, | ||
) {} | ||
|
||
public function getElement(): AbstractElement | ||
{ | ||
return $this->element; | ||
} | ||
|
||
/** | ||
* @return array<IndexInterface> | ||
*/ | ||
public function getIndices(): array | ||
{ | ||
return $this->indices; | ||
} | ||
} |
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,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Valantic\ElasticaBridgeBundle\Model\Event; | ||
|
||
use Elastica\Index; | ||
use Pimcore\Model\Element\AbstractElement; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
use Valantic\ElasticaBridgeBundle\Enum\Operation; | ||
use Valantic\ElasticaBridgeBundle\Index\IndexInterface; | ||
|
||
class RefreshedElementInIndexEvent extends Event | ||
{ | ||
public function __construct( | ||
public readonly AbstractElement $element, | ||
public readonly IndexInterface $index, | ||
public readonly Index $elasticaIndex, | ||
public readonly Operation $operation, | ||
) {} | ||
|
||
public function getElement(): AbstractElement | ||
{ | ||
return $this->element; | ||
} | ||
|
||
public function getIndex(): IndexInterface | ||
{ | ||
return $this->index; | ||
} | ||
|
||
public function getElasticaIndex(): Index | ||
{ | ||
return $this->elasticaIndex; | ||
} | ||
|
||
public function getOperation(): Operation | ||
{ | ||
return $this->operation; | ||
} | ||
} |
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.