Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from synolia/feature/894
Added events before and after processing Taxon and Product entities
- Loading branch information
Showing
11 changed files
with
171 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Synolia\SyliusAkeneoPlugin\Event\Product; | ||
|
||
use Sylius\Component\Core\Model\ProductInterface; | ||
use Synolia\SyliusAkeneoPlugin\Event\AbstractResourceEvent; | ||
|
||
class AfterProcessingProductEvent extends AbstractResourceEvent | ||
{ | ||
/** @var \Sylius\Component\Core\Model\ProductInterface */ | ||
private $product; | ||
|
||
public function __construct(array $resource, ProductInterface $taxon) | ||
{ | ||
parent::__construct($resource); | ||
|
||
$this->product = $taxon; | ||
} | ||
|
||
public function getProduct(): ProductInterface | ||
{ | ||
return $this->product; | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Synolia\SyliusAkeneoPlugin\Event\Product; | ||
|
||
use Synolia\SyliusAkeneoPlugin\Event\AbstractResourceEvent; | ||
|
||
class BeforeProcessingProductEvent extends AbstractResourceEvent | ||
{ | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Event/ProductVariant/AfterProcessingProductVariantEvent.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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Synolia\SyliusAkeneoPlugin\Event\ProductVariant; | ||
|
||
use Sylius\Component\Core\Model\ProductVariantInterface; | ||
use Synolia\SyliusAkeneoPlugin\Event\AbstractResourceEvent; | ||
|
||
class AfterProcessingProductVariantEvent extends AbstractResourceEvent | ||
{ | ||
/** @var \Sylius\Component\Core\Model\ProductVariantInterface */ | ||
private $productVariant; | ||
|
||
public function __construct(array $resource, ProductVariantInterface $taxon) | ||
{ | ||
parent::__construct($resource); | ||
|
||
$this->productVariant = $taxon; | ||
} | ||
|
||
public function getProductVariant(): ProductVariantInterface | ||
{ | ||
return $this->productVariant; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Event/ProductVariant/BeforeProcessingProductVariantEvent.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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Synolia\SyliusAkeneoPlugin\Event\ProductVariant; | ||
|
||
use Sylius\Component\Core\Model\ProductInterface; | ||
use Synolia\SyliusAkeneoPlugin\Event\AbstractResourceEvent; | ||
|
||
class BeforeProcessingProductVariantEvent extends AbstractResourceEvent | ||
{ | ||
/** @var \Sylius\Component\Core\Model\ProductInterface */ | ||
private $product; | ||
|
||
public function __construct(array $resource, ProductInterface $taxon) | ||
{ | ||
parent::__construct($resource); | ||
|
||
$this->product = $taxon; | ||
} | ||
|
||
public function getProduct(): ProductInterface | ||
{ | ||
return $this->product; | ||
} | ||
} |
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