-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak(Sales) add document status change event
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* Tine 2.0 | ||
* | ||
* @package Sales | ||
* @subpackage Event | ||
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 | ||
* @copyright Copyright (c) 2024 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* @author Paul Mehrer <p.mehrer@metaways.de> | ||
*/ | ||
|
||
class Sales_Event_DocumentStatusChange extends Tinebase_Event_Abstract | ||
{ | ||
public function __construct( | ||
protected Sales_Model_Document_Abstract $document, | ||
protected ?Sales_Model_Document_Abstract $orgDocument = null | ||
) | ||
{ | ||
parent::__construct([]); // use default value to avoid calling default constructor in case of signature change | ||
} | ||
|
||
public function getUpdatedDocument(): Sales_Model_Document_Abstract | ||
{ | ||
return $this->document; | ||
} | ||
|
||
public function getOriginalDocument(): ?Sales_Model_Document_Abstract | ||
{ | ||
return $this->orgDocument; | ||
} | ||
} |