Results

19.09.2020
cforge 2.0.x-dev :: modules/cforge_import/src/Plugin/CsvParser/Users.php
    parent::__construct($configuration, $plugin_id, $plugin_definition, $logger_channel);
    $this->siteSettings = $config_factory->get('system_site');
    $this->defaultCountryCode = $config_factory->get('system.date')->get('country.default');
    $this->roles = Role::loadMultiple();
  }

  /**
   * {@inheritDoc}
   */
24.05.2020
commerce_currency_resolver 8.x-1.53 :: src/CurrencyHelper.php
    // environment, use default country from Drupal.
    if (empty($country)) {
      $country = $this->configFactory->get('system.date')->get('country.default');
    }

    return $country;
  }

  /**
24.05.2020
commerce_currency_resolver 8.x-1.53 :: commerce_currency_resolver.install
  if (!\Drupal::isConfigSyncing()) {
    // Get default country and their currency.
    $default_country = \Drupal::config('system.date')->get('country.default');
    $default_country = $default_country ?: 'US';
    $country_repository = new CountryRepository();
    $country = $country_repository->get($default_country);
    $currency_code = $country->getCurrencyCode();

    // Set initial default currency by default country.
29.10.2020
commerce_kickstart 3.x-dev :: commerce_kickstart.install
  // Import a currency to speed up initial store setup.
  // If no default country is set, import the US Dollar, since it's common.
  $default_country = \Drupal::config('system.date')->get('country.default');
  $default_country = $default_country ?: 'US';
  $currency_importer = \Drupal::service('commerce_price.currency_importer');
  $currency_importer->importByCountry($default_country);

  $commerce_kickstart_install_demo = \Drupal::state()
    ->get('commerce_kickstart.install_demo', FALSE);
24.07.2020
currency 8.x-3.3 :: src/LocaleResolver.php
      // Try the site's default country code.
      if (!$currency_locale) {
        $country_code = $this->configFactory->get('system.date')->get('country.default');
        if ($country_code) {
          $currency_locale = $this->currencyLocaleStorage->load($language_code . '_' . $country_code);
        }

      }
24.07.2020
currency 8.x-3.3 :: tests/src/Unit/LocaleResolverTest.php
    $config->expects($this->any())
      ->method('get')
      ->with('country.default')
      ->willReturn($site_default_country);

    $this->configFactory->expects($this->once())
      ->method('get')
      ->with('system.date')
      ->willReturn($config);
    $config->expects($this->any())
      ->method('get')
      ->with('country.default')
      ->willReturn(NULL);

    $this->configFactory->expects($this->once())
      ->method('get')
      ->with('system.date')
      ->willReturn($config);
    $config->expects($this->any())
      ->method('get')
      ->with('country.default')
      ->willReturn(NULL);

    $this->configFactory->expects($this->once())
      ->method('get')
      ->with('system.date')
      ->willReturn($config);
03.02.2020
datalayer 8.x-1.x-dev :: tests/src/Kernel/DataLayerKernelTest.php
      [
        'drupalLanguage' => Language::$defaultValues['id'],
        'drupalCountry' => $this->config('system.date')->get('country.default'),
        'siteName' => $this->config('system.site')->get('name'),
      ],
      _datalayer_defaults()
    );
  }
03.02.2020
datalayer 8.x-1.x-dev :: datalayer.module
  return [
    $datalayer_settings->get('drupal_language') => $language->getId(),
    $datalayer_settings->get('drupal_country') => $site_config->get('country.default'),
    $datalayer_settings->get('site_name') => $site_name->get('name'),
  ];
}

/**
 * Agnosticly get the current menu object.
23.06.2020
dropsolid_rocketship_profile 8.x-2.x-dev :: src/Form/RocketshipSiteConfigureForm.php
      '#title' => $this->t('Default country'),
      '#empty_value' => '',
      '#default_value' => $this->config('system.date')->get('country.default'),
      '#options' => $countries,
      '#description' => $this->t('Select the default country for the site.'),
      '#weight' => 0,
    ];
    $form['regional_settings']['date_default_timezone'] = [
      '#type' => 'select',
    $this->config('system.date')
      ->set('timezone.default', (string) $form_state->getValue('date_default_timezone'))
      ->set('country.default', (string) $form_state->getValue('site_default_country'))
      ->save(TRUE);

    $account_values = $form_state->getValue('account');

    // Enable update.module if this option was selected.
    $update_status_module = $form_state->getValue('enable_update_status_module');
23.06.2020
dropsolid_rocketship_profile 8.x-2.x-dev :: dropsolid_rocketship_profile.install
  \Drupal::configFactory()
    ->getEditable('system.date')
    ->set('country.default', 'BE')
    ->set('first_day', 1)
    ->set('timezone.default', 'Europe/Brussels')
    ->set('timezone.user.configurable', FALSE)
    ->set('timezone.user.warn', FALSE)
    ->set('timezone.user.default', 0)
    ->save();
17.10.2020
farm 2.x-dev :: modules/core/settings/src/Form/FarmSettingsFarmInfoForm.php
      '#title' => $this->t('Default country'),
      '#empty_value' => '',
      '#default_value' => $system_date->get('country.default'),
      '#options' => $countries,
      '#attributes' => ['class' => ['country-detect']],
    ];

    // Get list of timezones.
    $timezones = system_time_zones();
    $this->configFactory->getEditable('system.date')
      ->set('timezone.default', $default_timezone)
      ->set('country.default', $default_country)
      ->save();

    // Display message from parent submitForm.
    parent::submitForm($form, $form_state);
  }
22.10.2019
global_gateway 8.x-1.x-dev :: src/Plugin/RegionNegotiation/RegionNegotiationDefault.php
   */
  public function getRegionCode(Request $request = NULL) {
    $default = \Drupal::config('system.date')->get('country.default');
    $code = $this->get('region_code');

    return $code ?: $default;
  }

  /**
30.01.2020
gmap_store_locator 8.x-1.4 :: src/Form/StoreLocatorForm.php
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $country_code = $this->config('system.date')->get('country.default');
    $form = parent::buildForm($form, $form_state);
    $form['finder'] = [
      '#type' => 'button',
      '#value' => $this->t('Find Lat/Long'),
      '#weight' => 90,
      '#ajax' => [
09.07.2020
murmurations 1.0.0-alpha1 :: src/Plugin/Murmurations/PluginBase.php
      $fields['region'] = $region;
    }
    $fields['country'] = $this->configFactory->get('system.date')->get('country.default');
    return $fields;
  }

  /**
   * @return array
   *   with float 'lat' and float 'lon'
16.10.2020
mutual_credit 5.0.x-dev :: src/Plugin/Murmurations/CommunityCurrency.php
      ],
      'location' => [
        'country' => $this->configFactory->get('system.date')->get('country.default')
      ],
      'geolocation' => $this->getCoords(),
      'profile_url' => $base_url .'/'. $this->getPublishPath(),
    ];
    if ($r = $murmurations_settings->get('region')) {
       $values['location']['region'] = $r;
16.10.2020
mutual_credit 5.0.x-dev :: modules/clearingcentral/src/ClearingCentral.php
    $this->walletEntityQuery = $entity_type_manager->getStorage('mcapi_wallet')->getQuery();
    $this->logger = $logger_channel;
    $this->country = $config_factory->get('system.date')->get('country.default');
    $this->accountSwitcher = $account_switcher;
    $this->messenger = $messenger;

    $settings = $config_factory->get('mcapi_cc.settings');
    $this->exchangeId = $settings->get('login');
    $this->pass = $settings->get('pass');
02.12.2022
postoffice_commerce 1.0.0-beta1 :: tests/src/Kernel/CommerceMailPluginTest.php
    $this->config('system.date')
      ->set('country.default', 'US')
      ->save();

    /* see EntityKernelTestBase */
    $this->installConfig(['user']);
    $this->installSchema('system', ['sequences']);
    $this->installSchema('user', ['users_data']);
21.07.2018
price 8.x-1.0 :: src/Resolver/DefaultCountryResolver.php
   */
  public function resolve() {
    $country_code = $this->configFactory->get('system.date')->get('country.default');
    return new Country($country_code);
  }

}
21.07.2018
price 8.x-1.0 :: price.install
    // Import a currency to speed up initial store setup.
    // If no default country is set, import the US Dollar, since it's common.
    $default_country = \Drupal::config('system.date')->get('country.default');
    $default_country = $default_country ?: 'US';
    $currency_importer = \Drupal::service('price.currency_importer');
    $currency_importer->importByCountry($default_country);
  }
}
11.08.2021
worldpay_corporate_gateway 8.x-1.4 :: src/Form/WorldpayGetUserInfo.php
      '#title' => $this->t('Default country'),
      '#empty_value' => '',
      '#default_value' => $system_date->get('country.default'),
      '#options' => $countries,
      '#attributes' => ['class' => ['country-detect']],
    ];
    $form['worldpay_corporate_gateway_full_name'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Full Name'),

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc