From 62c4dfafc18e2d0dfa466325d60a1eb8f81012ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kr=C3=B3l?= Date: Tue, 6 Feb 2018 18:53:06 +0100 Subject: [PATCH] Change label field to name --- src/Context/ShippingGatewayContext.php | 2 +- src/Resources/config/grids/bitbag_shipping_gateway.yml | 6 +++--- src/Resources/translations/messages.en.yml | 1 - src/Resources/translations/messages.pl.yml | 1 - tests/Behat/Context/Setup/ShippingGatewayContext.php | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Context/ShippingGatewayContext.php b/src/Context/ShippingGatewayContext.php index 27efa4d..fc3af64 100644 --- a/src/Context/ShippingGatewayContext.php +++ b/src/Context/ShippingGatewayContext.php @@ -99,7 +99,7 @@ public function getCode(): ?string public function getLabelByCode(?string $code): ?string { foreach ($this->shippingGateways as $shippingGatewayCode => $shippingGatewayLabel) { - if ($shippingGatewayCode === $code) { + if ($code === $shippingGatewayCode) { return $shippingGatewayLabel; } } diff --git a/src/Resources/config/grids/bitbag_shipping_gateway.yml b/src/Resources/config/grids/bitbag_shipping_gateway.yml index a8c2184..d47adcf 100644 --- a/src/Resources/config/grids/bitbag_shipping_gateway.yml +++ b/src/Resources/config/grids/bitbag_shipping_gateway.yml @@ -12,10 +12,10 @@ sylius_grid: type: string label: sylius.ui.code sortable: code - label: + name: type: string - label: bitbag.ui.label - sortable: label + label: sylius.ui.name + sortable: name filters: search: type: string diff --git a/src/Resources/translations/messages.en.yml b/src/Resources/translations/messages.en.yml index a39fc97..f51dd20 100644 --- a/src/Resources/translations/messages.en.yml +++ b/src/Resources/translations/messages.en.yml @@ -1,7 +1,6 @@ bitbag: ui: shipping_gateways: Shipping gateways - label: Name create_shipping_gateway: Create shipping gateway manage_shipping_gateways: Manage shipping gateways choose_shipping_method: Choose shipping method diff --git a/src/Resources/translations/messages.pl.yml b/src/Resources/translations/messages.pl.yml index ddf24ae..c67f311 100644 --- a/src/Resources/translations/messages.pl.yml +++ b/src/Resources/translations/messages.pl.yml @@ -1,7 +1,6 @@ bitbag: ui: shipping_gateways: Bramy dostawców - label: Nazwa create_shipping_gateway: Stwórz bramę dostawcy manage_shipping_gateways: Zarządzaj bramami dostawców choose_shipping_method: Wybierz metodę wysyłki diff --git a/tests/Behat/Context/Setup/ShippingGatewayContext.php b/tests/Behat/Context/Setup/ShippingGatewayContext.php index 0658eed..bb91e09 100644 --- a/tests/Behat/Context/Setup/ShippingGatewayContext.php +++ b/tests/Behat/Context/Setup/ShippingGatewayContext.php @@ -96,7 +96,7 @@ public function thereIsARegisteredShippingGatewayForThisShippingMethod($code, $n $shippingGateway->addShippingMethod($shippingMethod); $shippingGateway->setCode($code); - $shippingGateway->setLabel($name); + $shippingGateway->setName($name); $shippingGateway->setConfig(['iban' => '123', 'address' => 'foo bar']); $this->sharedStorage->set('shipping_gateway', $shippingGateway);