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');
21.09.2020
address 8.x-1.x-dev ::
src/Element/Country.php
$default_country = key($country_list); $site_country = \Drupal::config('system.date')->get('country.default'); if ($site_country && isset($country_list[$site_country])) { $default_country = $site_country; } return $default_country; }
20.05.2022
address_suggestion 1.0.3 ::
src/Plugin/Field/FieldWidget/AddressSuggestionWidgetField.php
'#default_value' => $items[$delta]->value ?? NULL, ]; $country = $this->configFactory->get('system.date')->get('country.default'); $fieldDefinition = $this->fieldDefinition; $parameters = [ 'entity_type' => $fieldDefinition->getTargetEntityTypeId(), 'bundle' => $fieldDefinition->getTargetBundle(), 'field_name' => $items->getName(), ];
20.05.2022
address_suggestion 1.0.3 ::
src/Element/AddressSuggestion.php
// Set default country. if (empty($value['country_code'])) { $system_country = \Drupal::config('system.date')->get('country.default'); $value['country_code'] = !empty($system_country) ? $system_country : 'US'; } $element = static::addressElements($element, $value); $element["address_line"] = $element["address_line1"]; $element["address_line"]["#required"] = FALSE; $element["address_line"]["#attributes"] = [
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); } } /**