forked from thelia/thelia
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
:corrlib/Thelange rate, add error message in the currency configurati…
…on page when an exchange rate could not be found (related thelia#1751) /Controller/Admin/CurrencyController.php templates/backOffice/default/I18n/en_US.php templates/backOffice/default/I18n/fr_FR.php
- Loading branch information
1 parent
4af4b98
commit 5f86a0d
Showing
8 changed files
with
111 additions
and
14 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
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
41 changes: 41 additions & 0 deletions
41
core/lib/Thelia/Core/Event/Currency/CurrencyUpdateRateEvent.php
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,41 @@ | ||
<?php | ||
/*************************************************************************************/ | ||
/* This file is part of the Thelia package. */ | ||
/* */ | ||
/* Copyright (c) OpenStudio */ | ||
/* email : dev@thelia.net */ | ||
/* web : http://www.thelia.net */ | ||
/* */ | ||
/* For the full copyright and license information, please view the LICENSE.txt */ | ||
/* file that was distributed with this source code. */ | ||
/*************************************************************************************/ | ||
|
||
namespace Thelia\Core\Event\Currency; | ||
|
||
use Thelia\Core\Event\ActionEvent; | ||
|
||
class CurrencyUpdateRateEvent extends ActionEvent | ||
{ | ||
protected $undefinedRates = []; | ||
|
||
/** | ||
* @param int $currencyId | ||
*/ | ||
public function addUndefinedRate($currencyId) | ||
{ | ||
$this->undefinedRates[] = $currencyId; | ||
} | ||
|
||
public function hasUndefinedRates() | ||
{ | ||
return ! empty($this->undefinedRates); | ||
} | ||
|
||
/** | ||
* @return array of currency objects | ||
*/ | ||
public function getUndefinedRates() | ||
{ | ||
return $this->undefinedRates; | ||
} | ||
} |
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