Skip to content
Snippets Groups Projects
Commit 253510f0 authored by Ankit Pathak's avatar Ankit Pathak
Browse files

Minor change.

parent 89efbd54
No related branches found
No related tags found
1 merge request!54Automated Project Update Bot fixes from run 11-188815.
......@@ -2,11 +2,8 @@
namespace Drupal\geocoder\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* The geocoder settings form.
......@@ -32,15 +29,17 @@ class SettingsForm extends ConfigFormBase {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('geocoder.settings');
// Checking the typedConfigManager - property exists in ConfigFormBase.
if (property_exists(ConfigFormBase::class, 'typedConfigManager')) {
$geocoder_config_schema = $this->typedConfigManager->getDefinition('geocoder.settings') + ['mapping' => []];
}
else {
// Handling backward compatiblity before D10.2
// Calling typedConfigManager() of ConfigFormBase class.
$geocoder_config_schema = $this->typedConfigManager();
// Calling typedConfigManager() of ConfigFormBase class.
$typedConfigManager = $this->typedConfigManager();
$geocoder_config_schema = $typedConfigManager->getDefinition('geocoder.settings') + ['mapping' => []];
}
$geocoder_config_schema = $geocoder_config_schema['mapping'];
// Attach Geofield Map Library.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment