Results
04.09.2019
biopama_protected_areas 8.x-1.3 ::
config/optional/core.entity_form_display.node.country.default.yml
module: - text id: node.country.default targetEntityType: node bundle: country mode: default content: body: type: text_textarea_with_summary
04.09.2019
biopama_protected_areas 8.x-1.3 ::
config/optional/core.entity_view_display.node.country.default.yml
- text - user id: node.country.default targetEntityType: node bundle: country mode: default content: body: label: hidden
17.07.2018
commerce 8.x-2.8 ::
tests/src/Unit/Resolver/DefaultCountryResolverTest.php
$config->expects($this->once()) ->method('get') ->with('country.default') ->will($this->returnValue('RS')); $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $config_factory->expects($this->once()) ->method('get') ->with('system.date')
17.07.2018
commerce 8.x-2.8 ::
src/Resolver/DefaultCountryResolver.php
*/ public function resolve() { $country_code = $this->configFactory->get('system.date')->get('country.default'); return new Country($country_code); } }
17.07.2018
commerce 8.x-2.8 ::
modules/price/commerce_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('commerce_price.currency_importer'); $currency_importer->importByCountry($default_country); } }
07.09.2018
contest 8.x-1.0-alpha2 ::
src/Form/ContestViewForm.php
public function buildForm(array $form, FormStateInterface $form_state, ContestInterface $contest = NULL, Request $request = NULL) { $fieldset_title = $this->t('Contestant Profile'); $states = ContestHelper::getStates($this->cfgStore->get('system.date')->get('country.default')); $usr = new ContestUser($this->currentUser()->id()); // If the contest isn't running. if (REQUEST_TIME < $contest->start->value || $contest->end->value < REQUEST_TIME) { $form['body'] = [ '#type' => 'markup',
07.09.2018
contest 8.x-1.0-alpha2 ::
src/Form/ContestValidateTrait.php
case 'state': $states = ContestHelper::getStates(\Drupal::config('system.date')->get('country.default')); return !empty($states[$value]); case 'string': return (bool) (preg_match('/[a-zA-z]+/', $value) && strlen(trim($value)) <= ContestStorage::STRING_MAX); case 'uid':
07.09.2018
contest 8.x-1.0-alpha2 ::
src/ContestHelper.php
$contest->http_host = $_SERVER['HTTP_HOST']; $contest->http_server = $_SERVER['SERVER_NAME']; $contest->country = \Drupal::config('system.date')->get('country.default'); $contest->timezone = \Drupal::config('system.date')->get('timezone.default'); $contest->now = REQUEST_TIME; $contest->config = (object) \Drupal::config('contest.config')->get(); $contest->host = new ContestUser($host->uid, ['title' => $host->title]); $contest->sponsor = new ContestUser($contest->sponsor_uid, ['url' => $contest->sponsor_url]); $contest->contestants = $contestants;
'http_host' => $_SERVER['HTTP_HOST'], 'http_server' => $_SERVER['SERVER_NAME'], 'country' => \Drupal::config('system.date')->get('country.default'), 'timezone' => \Drupal::config('system.date')->get('timezone.default'), 'host' => new ContestUser(1), 'sponsor' => new ContestUser(1), 'contestants' => [], 'entrants' => 0, 'entries' => 0,
07.09.2018
contest 8.x-1.0-alpha2 ::
contest.tokens.inc
switch ($key) { case 'country': $x[$token] = \Drupal::config('system.date')->get('country.default'); break; case 'date-end': $x[$token] = $dateFrmt->format($contest->end, 'contest_date'); break;
07.09.2018
contest 8.x-1.0-alpha2 ::
contest.install
switch ($phase) { case 'install': if (!$cfg->get('country.default')) { $reqs['system'] = [ 'title' => t('Default Country'), 'value' => t("The default country isn't configured."), 'severity' => REQUIREMENT_ERROR, 'description' => t('Aborting! The default country needs to be configured. Please go to <a href="@url" target="_blank">regional settings</a> to configure.', ['@url' => \Drupal::url('system.regional_settings')]), ];
07.09.2018
contest 8.x-1.0-alpha2 ::
contest.module
function contest_form_user_form_alter(&$form, FormStateInterface $form_state, $form_id) { $birthdate = !empty($form['field_contest_birthdate']['widget'][0]['value']['#default_value']) ? $form['field_contest_birthdate']['widget'][0]['value']['#default_value'] : REQUEST_TIME; $states = ContestHelper::getStates(\Drupal::config('system.date')->get('country.default')); // Birthdate. if (!empty($form['field_contest_birthdate'])) { array_unshift($form['#validate'], 'contest_user_form_validate'); $form['birthdate'] = [
28.08.2018
presto 8.x-2.2 ::
src/Plugin/Presto/OptionalDependency/InstallPrestoCommerceCurrency.php
public static function createCurrency() { // If default country is Australia do not import the AUD Dollar. $default_country = \Drupal::config('system.date')->get('country.default'); if ($default_country !== 'AU') { $currency_importer = \Drupal::service('commerce_price.currency_importer'); $currency_importer->importByCountry('AU'); } }
12.09.2020
siteinfo 8.x-1.x-dev ::
src/Controller/SiteInformationController.php
$admin_theme = Drupal::config('system.theme')->get('admin'); $front_page = Drupal::config('system.site')->get('page.front'); $country = Drupal::config('system.date')->get('country.default'); $time_zone = Drupal::config('system.date')->get('timezone.default'); $language_code = Drupal::config('system.site')->get('default_langcode'); $file_system = Drupal::config('system.file')->get('default_scheme'); $file_path = Drupal::config('system.file')->get('path.temporary'); $cron_last = Drupal::state()->get('system.cron_last'); $cron_run = Drupal::service('date.formatter')->formatTimeDiffSince($cron_last);
13.10.2020
contacts_events 8.x-1.x-dev ::
tests/src/Kernel/RecalculateOnBookingWindowTest.php
parent::setUp(); $this->installEntitySchema('contacts_event'); $this->config('system.date')->set('country.default', 'GB')->save(); $this->installConfig(['commerce_order', 'system', 'contacts_events']); } /** * Test the booking window recalculation. *
13.10.2020
contacts_events 8.x-1.x-dev ::
tests/src/Kernel/EventClassEvaluationTest.php
public function testDateConditions($date_of_birth, $event_date, $adult_result, $child_result) { $this->enableModules(static::$fullStackModules); $this->config('system.date')->set('country.default', 'GB')->save(); $this->installEntitySchema('commerce_store'); $this->installConfig(['commerce_order', 'system', 'contacts_events']); $this->installEntitySchema('contacts_event'); $this->installEntitySchema('contacts_ticket'); $this->installEntitySchema('commerce_order');
30.09.2020
apigee_m10n 8.x-1.7 ::
modules/apigee_m10n_add_credit/src/Plugin/Requirement/Requirement/CommerceStore.php
'#type' => 'address_country', '#required' => TRUE, '#default_value' => $this->getConfigFactory()->get('system.date')->get('country.default'), ]; $address_fields = [ AddressField::ADDRESS_LINE1 => [ 'size' => 60, 'placeholder' => 'Acme Street',
25.08.2020
arch 8.x-1.x-dev ::
modules/price/src/EventSubscriber/CurrencyLocaleSubscriber.php
*/ public function onResolveCountryCode(ResolveCountryCode $event, $event_name, EventDispatcherInterface $dispatcher) { $country_code = $this->configFactory->get('system.date')->get('country.default'); if ($country_code) { $event->setCountryCode($country_code); } } /**
19.09.2020
cforge 2.0.x-dev ::
src/Plugin/CsvParser/Users.php
'address.administrative_area' => t('Region/Province'), // 'address.postal_code', we have no way to force these to be valid. 'address.country_code' => t('2 digit country code (default is @default)', ['@default' => \Drupal::config('system.date')->get('country.default')]), 'show_phone' => t('0 or 1 to reveal phone number(s) to other members'), 'show_address' => t('0 or 1 to reveal address to other members'), 'show_email' => t('0 or 1 to reveal definitive email to other members'), // 'grossincome' => t('gross income (instead of transaction import)'), // 'balance' => t('current balance (instead of transaction import)') ];
19.09.2020
cforge 2.0.x-dev ::
src/Setup.php
$this->extensionDiscovery = new ExtensionDiscovery(\Drupal::service('app.root')); $this->countryManager = $country_manager; $this->country = $this->config('system.date')->get('country.default'); } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) {
$country_code = $form_state->getValue('site_default_country') ?? $this->config('system.date')->get('country.default'); self::setDefaultCountry($country_code); // Set up the currency by deleting the others. if ($c = Currency::load('veur')) { $c->delete(); }
$field->set('settings', $settings) ->save(); \Drupal::configFactory()->getEditable('system.date')->set('country.default', $country_code)->save(); foreach (\Drupal::entityTypeManager()->getStorage('user')->loadMultiple() as $user) { if ($user->isAnonymous()) continue; $user->address->country_code = $country_code; $user->save(); } }
19.09.2020
cforge 2.0.x-dev ::
modules/cforge_address/cforge_address.install
function cforge_address_install() { $default_country = \Drupal::Config('system.date') ->get('country.default'); FieldConfig::load('user.user.address') ->setSetting('available_countries', [$default_country]) ->save(); $hoods = \Drupal::database()->select('user__address', 'a') ->fields('a', ['address.dependent_locality'])