Skip to content

Commit

Permalink
Adjust new Sylius plugin standards
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbager committed Feb 6, 2018
1 parent 62c4dfa commit 04b2e71
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class BitBagShippingExportPlugin extends Bundle
final class BitBagSyliusShippingExportPlugin extends Bundle
{
use SyliusPluginTrait;

Expand Down
14 changes: 7 additions & 7 deletions src/Resources/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
imports:
- { resource: "@BitBagShippingExportPlugin/Resources/config/resource/bitbag_shipping_gateway.yml" }
- { resource: "@BitBagShippingExportPlugin/Resources/config/resource/bitbag_shipping_export.yml" }
- { resource: "@BitBagShippingExportPlugin/Resources/config/grids/bitbag_shipping_gateway.yml" }
- { resource: "@BitBagShippingExportPlugin/Resources/config/grids/bitbag_shipping_export.yml" }
- { resource: "@BitBagShippingExportPlugin/Resources/config/services.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/resource/bitbag_shipping_gateway.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/resource/bitbag_shipping_export.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/grids/bitbag_shipping_gateway.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/grids/bitbag_shipping_export.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/services.yml" }

sylius_grid:
templates:
action:
create_shipping_gateway: "@BitBagShippingExportPlugin/ShippingGateway/Action/_create.html.twig"
export_shipments: "@BitBagShippingExportPlugin/ShippingExport/Action/_exportShipments.html.twig"
create_shipping_gateway: "@BitBagSyliusShippingExportPlugin/ShippingGateway/Action/_create.html.twig"
export_shipments: "@BitBagSyliusShippingExportPlugin/ShippingExport/Action/_exportShipments.html.twig"
1 change: 1 addition & 0 deletions src/Resources/config/doctrine/ShippingExport.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ BitBag\SyliusShippingExportPlugin\Entity\ShippingExport:
manyToOne:
shippingGateway:
targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway
inversedBy: shippingExports
joinColumn:
name: shipping_gateway_id
referencedColumnName: id
Expand Down
10 changes: 5 additions & 5 deletions src/Resources/config/grids/bitbag_shipping_export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sylius_grid:
path: .
sortable: shipment.order
options:
template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/orderNumber.html.twig"
template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/orderNumber.html.twig"
shipment:
type: datetime
label: sylius.ui.created_at
Expand All @@ -30,28 +30,28 @@ sylius_grid:
path: .
sortable: ~
options:
template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/exportedAt.html.twig"
template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/exportedAt.html.twig"
shippingMethod:
type: twig
label: sylius.ui.shipping_method
path: .
sortable: ~
options:
template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/shippingMethod.html.twig"
template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/shippingMethod.html.twig"
labelPath:
type: twig
label: bitbag.ui.shipping_export_label
path: .
sortable: ~
options:
template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/shippingExportLabel.html.twig"
template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/shippingExportLabel.html.twig"
state:
type: twig
label: sylius.ui.state
path: .
sortable: ~
options:
template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/state.html.twig"
template: "@BitBagSyliusShippingExportPlugin/ShippingExport/Grid/Field/state.html.twig"
filters:
search:
type: string
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/config/routing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bitbag_shipping_gateway:
resource: "@BitBagShippingExportPlugin/Resources/config/routing/bitbag_shipping_gateway.yml"
resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing/bitbag_shipping_gateway.yml"

bitbag_shipping_export:
resource: "@BitBagShippingExportPlugin/Resources/config/routing/bitbag_shipping_export.yml"
resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing/bitbag_shipping_export.yml"
2 changes: 1 addition & 1 deletion tests/Application/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function registerBundles(): array
new \FOS\OAuthServerBundle\FOSOAuthServerBundle(), // Required by SyliusApiBundle
new \Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle(),

new \BitBag\SyliusShippingExportPlugin\BitBagShippingExportPlugin(),
new \BitBag\SyliusShippingExportPlugin\BitBagSyliusShippingExportPlugin(),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Application/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ imports:
- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" }

- { resource: "@BitBagShippingExportPlugin/Resources/config/config.yml" }
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/config.yml" }

- { resource: "../../../../vendor/sylius/sylius/app/config/security.yml" }

Expand Down
2 changes: 1 addition & 1 deletion tests/Application/app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ sylius:
resource: "../../../../vendor/sylius/sylius/app/config/routing.yml"

bitbag_shipping_export_plugin:
resource: "@BitBagShippingExportPlugin/Resources/config/routing.yml"
resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing.yml"
prefix: /admin

0 comments on commit 04b2e71

Please sign in to comment.