-
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.
Add settings to be able setup timeout for clean logs (#3)
Co-authored-by: Maksim Artemenko <[email protected]>
- Loading branch information
Showing
5 changed files
with
56 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* @author Mygento Team | ||
* @copyright 2023 Mygento (https://www.mygento.com) | ||
* @package Mygento_Smtp | ||
*/ | ||
|
||
namespace Mygento\Smtp\Model; | ||
|
||
use Magento\Framework\App\Config\ScopeConfigInterface; | ||
|
||
class Config | ||
{ | ||
private const XML_PATH_EMAIL_LOG = 'system/smtp/log'; | ||
private const XML_PATH_CLEAN_EMAIL_PERIOD = 'system/smtp/clean_email_period'; | ||
|
||
public function __construct( | ||
private ScopeConfigInterface $scopeConfig | ||
) { | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isEnabled(): bool | ||
{ | ||
return $this->scopeConfig->isSetFlag(self::XML_PATH_EMAIL_LOG); | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getCleanEmailPeriod(): ?string | ||
{ | ||
return $this->scopeConfig->getValue(self::XML_PATH_CLEAN_EMAIL_PERIOD); | ||
} | ||
} |
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