Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EWPP-4739: Update label of szech-republic option to 'Czechia'. #236

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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