-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add command payments:change_vat to PaymentsModule
The command was originally internal and it's now being extracted to the open-sourced module. Internals are moved to the event handlers. remp/crm#3357
- Loading branch information
Showing
3 changed files
with
42 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Crm\SubscriptionsModule\Events; | ||
|
||
use Nette\Database\Table\ActiveRow; | ||
|
||
interface SubscriptionTypeItemEventInterface | ||
{ | ||
public function getSubscriptionTypeItem(): ?ActiveRow; | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Crm\SubscriptionsModule\Events; | ||
|
||
use League\Event\AbstractEvent; | ||
use Nette\Database\Table\ActiveRow; | ||
|
||
class SubscriptionTypeItemUpdatedEvent extends AbstractEvent implements SubscriptionTypeEventInterface, SubscriptionTypeItemEventInterface | ||
{ | ||
public function __construct(private ActiveRow $subscriptionTypeItem) | ||
{ | ||
} | ||
|
||
public function getSubscriptionTypeItem(): ?ActiveRow | ||
{ | ||
return $this->subscriptionTypeItem; | ||
} | ||
|
||
public function getSubscriptionType(): ActiveRow | ||
{ | ||
return $this->subscriptionTypeItem->subscription_type; | ||
} | ||
} |
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