-
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.
Add new scenario-related
new-invoice
trigger
remp/crm#3003
- Loading branch information
Matus Kalafut
committed
Oct 16, 2023
1 parent
cc7f9a5
commit 0f3f848
Showing
4 changed files
with
49 additions
and
1 deletion.
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\InvoicesModule\Events; | ||
|
||
use Nette\Database\Table\ActiveRow; | ||
|
||
interface InvoiceEventInterface | ||
{ | ||
public function getInvoice(): 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,21 @@ | ||
<?php | ||
|
||
namespace Crm\InvoicesModule\Events; | ||
|
||
use League\Event\AbstractEvent; | ||
use Nette\Database\Table\ActiveRow; | ||
|
||
class NewInvoiceEvent extends AbstractEvent implements InvoiceEventInterface | ||
{ | ||
private ActiveRow $invoice; | ||
|
||
public function __construct($invoice) | ||
{ | ||
$this->invoice = $invoice; | ||
} | ||
|
||
public function getInvoice(): ActiveRow | ||
{ | ||
return $this->invoice; | ||
} | ||
} |
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