-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae9d759
commit fa2e3fc
Showing
4 changed files
with
21 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
<?php | ||
namespace Dfe\YandexKassa; | ||
use Df\Payment\Settings\Options as O; | ||
use Df\Payment\ConfigProvider\IOptions; | ||
// 2017-09-17 | ||
final class ConfigProvider extends \Df\Payment\ConfigProvider { | ||
/** @method Settings s() */ | ||
final class ConfigProvider extends \Df\Payment\ConfigProvider implements IOptions { | ||
/** | ||
* 2017-09-18 | ||
* @override | ||
* @see \Df\Payment\ConfigProvider\IOptions::options() | ||
* @used-by \Df\Payment\ConfigProvider::configOptions() | ||
* @return array(<value> => <label>) | ||
*/ | ||
function options() {return $this->s()->options()->o(true);} | ||
|
||
/** | ||
* 2017-09-17 | ||
* @override | ||
* @see \Df\Payment\ConfigProvider::config() | ||
* @used-by \Df\Payment\ConfigProvider::getConfig() | ||
* @return array(string => mixed) | ||
*/ | ||
protected function config() { | ||
$s = $this->s(); /** @var Settings $s */ | ||
$o = $s->options(); /** @var O $o */ | ||
return [ | ||
'needShowOptions' => $o->needShow() | ||
// 2017-09-17 | ||
// @used-by Df_Payments/withOptions::options() | ||
// https://github.com/mage2pro/core/blob/2.0.36/Payment/view/frontend/web/withOptions.js?ts=4#L55 | ||
,'options' => $o->o(true) | ||
] + parent::config(); | ||
} | ||
protected function config() {return self::configOptions($this) + parent::config() + [ | ||
'needShowOptions' => $this->s()->options()->needShow() | ||
];} | ||
} |
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