Skip to content

Commit

Permalink
Merge pull request #4 from klas/v.5.x
Browse files Browse the repository at this point in the history
V.5.x
  • Loading branch information
chrisaligent authored Jun 28, 2022
2 parents 67d570f + b5e033f commit c341616
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ This bundle supports the following Oro Platform versions:
* Oro Platform v4.2.x
- Support for this version is on the "v4.2.x" branch

* Oro Platform v5.x
- Support for this version is on the "v5.x" branch

The Master branch will always track support for the latest released Oro Platform version.

Installation and Usage
Expand All @@ -43,14 +46,6 @@ Installation and Usage
# locale_key: %kernel.default_locale%
# etc. Refer to the ewz_recaptcha package for more information.
# optional, modify key values if you need to override this bundle's default settings
hack_oro_recaptcha:
settings:
#theme: light
#size: normal
#protect_registration: true
#protect_contact_form: true
```
1. Purge Oro cache:
```bash
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Oro Bundle to inject ReCAPTCHA into public forms",
"type": "project",
"require": {
"oro/platform": "4.2.*",
"oro/platform": "5.0.*",
"excelwebzone/recaptcha-bundle": "^1.5"
},
"autoload": {
Expand Down
19 changes: 11 additions & 8 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root(HackOroRecaptchaExtension::ALIAS);
$treeBuilder = new TreeBuilder(HackOroRecaptchaExtension::ALIAS);
$rootNode = $treeBuilder->getRootNode();

SettingsBuilder::append(
$rootNode,
Expand All @@ -47,12 +47,15 @@ public function getConfigTreeBuilder()
return $treeBuilder;
}

/**
* @param string $key
* @return string
*/
public static function getConfigKeyByName($key)

/**
* Returns full key name by it's last part
*
* @param $name string last part of the key name (one of the class cons can be used)
* @return string full config path key
*/
public static function getConfigKeyByName($name)
{
return implode(ConfigManager::SECTION_MODEL_SEPARATOR, [HackOroRecaptchaExtension::ALIAS, $key]);
return HackOroRecaptchaExtension::ALIAS . ConfigManager::SECTION_MODEL_SEPARATOR . $name;
}
}

0 comments on commit c341616

Please sign in to comment.