Skip to content

Commit

Permalink
Merge pull request #236 from openeuropa/EWPP-4839
Browse files Browse the repository at this point in the history
EWPP-4739: Update label of szech-republic option to 'Czechia'.
  • Loading branch information
upchuk authored Dec 6, 2024
2 parents 4ec0246 + c5229bd commit 880db61
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use Drupal\oe_paragraphs_illustrations_lists\Event\RatioOptionsEvent;
*
* @see options_allowed_values()
*/
function _oe_paragraphs_illustrations_lists_allowed_values_ratios(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
function _oe_paragraphs_illustrations_lists_allowed_values_ratios(FieldStorageDefinitionInterface $definition, ?FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
$event = new RatioOptionsEvent();

\Drupal::service('event_dispatcher')->dispatch($event, RatioOptionsEvent::class);
Expand All @@ -51,7 +51,7 @@ function _oe_paragraphs_illustrations_lists_allowed_values_ratios(FieldStorageDe
*
* @see options_allowed_values()
*/
function _oe_paragraphs_illustrations_lists_allowed_values_columns(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
function _oe_paragraphs_illustrations_lists_allowed_values_columns(FieldStorageDefinitionInterface $definition, ?FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
$event = new ColumnOptionsEvent();

\Drupal::service('event_dispatcher')->dispatch($event, ColumnOptionsEvent::class);
Expand Down
4 changes: 2 additions & 2 deletions oe_paragraphs.module
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function oe_paragraphs_entity_base_field_info(EntityTypeInterface $entity_type):
*
* @see options_allowed_values()
*/
function _oe_paragraphs_allowed_values_icons(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE) {
function _oe_paragraphs_allowed_values_icons(FieldStorageDefinitionInterface $definition, ?FieldableEntityInterface $entity = NULL, &$cacheable = TRUE) {
$event = new IconOptionsEvent();

$event_dispatcher = \Drupal::service('event_dispatcher');
Expand All @@ -78,7 +78,7 @@ function _oe_paragraphs_allowed_values_icons(FieldStorageDefinitionInterface $de
*
* @see options_allowed_values()
*/
function _oe_paragraphs_allowed_values_flags(FieldStorageDefinitionInterface $definition, FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
function _oe_paragraphs_allowed_values_flags(FieldStorageDefinitionInterface $definition, ?FieldableEntityInterface $entity = NULL, &$cacheable = TRUE): array {
$event = new FlagOptionsEvent();

\Drupal::service('event_dispatcher')->dispatch($event, FlagOptionsEvent::class);
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/OptionsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function getFlagOptions(FlagOptionsEvent $event): void {
'bulgaria' => $this->t('Bulgaria'),
'croatia' => $this->t('Croatia'),
'cyprus' => $this->t('Cyprus'),
'czech-republic' => $this->t('Czech republic'),
'czech-republic' => $this->t('Czechia'),
'denmark' => $this->t('Denmark'),
'estonia' => $this->t('Estonia'),
'EU' => $this->t('EU'),
Expand Down
2 changes: 1 addition & 1 deletion tests/Traits/FieldsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function getMultipleCardinalityFieldTable(string $field, int $position
* @return \Behat\Mink\Element\NodeElement|null
* The field if found, NULL otherwise.
*/
protected function findField(string $label, NodeElement $container = NULL): ?NodeElement {
protected function findField(string $label, ?NodeElement $container = NULL): ?NodeElement {
$container = $container ?? $this->getSession()->getPage();

// Try to find the field with the standard method.
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Functional/ParagraphsTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Drupal\Tests\oe_paragraphs\Functional;

use Drupal\Tests\BrowserTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\Tests\BrowserTestBase;

/**
* Base class to test paragraphs.
Expand Down

0 comments on commit 880db61

Please sign in to comment.