-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Magento 2.3/2.4 - Popup] #26 - Add a configuration to open automatic…
…ally gift sales rule popup
- Loading branch information
1 parent
fe60139
commit 1a9a03a
Showing
8 changed files
with
78 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,49 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this module to newer | ||
* versions in the future. | ||
* | ||
* @category Smile | ||
* @package Smile\GiftSalesRule | ||
* @author Pierre Le Maguer <[email protected]> | ||
* @copyright 2020 Smile | ||
* @license Open Software License ("OSL") v. 3.0 | ||
*/ | ||
namespace Smile\GiftSalesRule\ViewModel; | ||
|
||
use Magento\Framework\View\Element\Block\ArgumentInterface; | ||
use Smile\GiftSalesRule\Helper\Config as GiftRuleConfig; | ||
|
||
/** | ||
* View Model: Gift Rule | ||
* | ||
* @author Pierre Le Maguer <[email protected]> | ||
* @copyright 2020 Smile | ||
*/ | ||
class GiftRule implements ArgumentInterface | ||
{ | ||
/** | ||
* @var GiftRuleConfig | ||
*/ | ||
protected $giftRuleConfig; | ||
|
||
/** | ||
* @param GiftRuleConfig $giftRuleConfig Gift rule config | ||
*/ | ||
public function __construct(GiftRuleConfig $giftRuleConfig) | ||
{ | ||
$this->giftRuleConfig = $giftRuleConfig; | ||
} | ||
|
||
/** | ||
* Is popup automatic open enabled ? | ||
* | ||
* @return bool | ||
*/ | ||
public function isAutomaticPopupOpenEnabled(): bool | ||
{ | ||
return $this->giftRuleConfig->isAutomaticPopupOpenEnabled(); | ||
} | ||
} |
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