Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preapre Sylius plugin standard version
- Loading branch information
Showing
35 changed files
with
94 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
includes: | ||
- vendor/sylius-labs/coding-standard/easy-coding-standard.neon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
suites: | ||
main: | ||
namespace: BitBag\MailChimpPlugin | ||
psr4_prefix: BitBag\MailChimpPlugin | ||
namespace: BitBag\SyliusMailChimpPlugin | ||
psr4_prefix: BitBag\SyliusMailChimpPlugin | ||
src_path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
spec/Validator/Constraints/UniqueNewsletterEmailValidatorSpec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/MailChimpPlugin.php → src/BitBagSyliusMailChimpPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?php | ||
|
||
namespace BitBag\MailChimpPlugin; | ||
namespace BitBag\SyliusMailChimpPlugin; | ||
|
||
use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
final class MailChimpPlugin extends Bundle | ||
final class BitBagSyliusMailChimpPlugin extends Bundle | ||
{ | ||
use SyliusPluginTrait; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ependencyInjection/MailChimpExtension.php → ...ection/BitBagSyliusMailChimpExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
services: | ||
bitbag.mailchimp_plugin.validator.email_validator: | ||
class: BitBag\MailChimpPlugin\Validator\NewsletterValidator | ||
bitbag_sylius_mailchimp_plugin.validator.email_validator: | ||
class: BitBag\SyliusMailChimpPlugin\Validator\NewsletterValidator | ||
arguments: | ||
- "@validator" | ||
- "@sylius.manager.customer" | ||
|
||
bitbag.mailchimp_plugin.drewm.mailchimp: | ||
bitbag_sylius_mailchimp_plugin.drewm.mailchimp: | ||
class: DrewM\MailChimp\MailChimp | ||
arguments: | ||
- "%mailchimp.api_key%" | ||
|
||
bitbag.mailchimp_plugin.handler.newsleter_subscription_handler: | ||
class: BitBag\MailChimpPlugin\Handler\NewsletterSubscriptionHandler | ||
bitbag_sylius_mailchimp_plugin.handler.newsleter_subscription_handler: | ||
class: BitBag\SyliusMailChimpPlugin\Handler\NewsletterSubscriptionHandler | ||
arguments: | ||
- "@sylius.repository.customer" | ||
- "@sylius.factory.customer" | ||
- "@sylius.manager.customer" | ||
- "@bitbag.mailchimp_plugin.drewm.mailchimp" | ||
- "@bitbag_sylius_mailchimp_plugin.drewm.mailchimp" | ||
- "%mailchimp.list_id%" | ||
|
||
bitbag.mailchimp_plugin.validator.unique_newsletter_email_validator: | ||
class: BitBag\MailChimpPlugin\Validator\Constraints\UniqueNewsletterEmailValidator | ||
bitbag_sylius_mailchimp_plugin.validator.unique_newsletter_email_validator: | ||
class: BitBag\SyliusMailChimpPlugin\Validator\Constraints\UniqueNewsletterEmailValidator | ||
arguments: | ||
- "@sylius.repository.customer" | ||
tags: | ||
- { name: "validator.constraint_validator" } | ||
|
||
bitbag.mailchimp_plugin.event_listener.customer_listener: | ||
class: BitBag\MailChimpPlugin\EventListener\CustomerNewsletterListener | ||
bitbag_sylius_mailchimp_plugin.event_listener.customer_listener: | ||
class: BitBag\SyliusMailChimpPlugin\EventListener\CustomerNewsletterListener | ||
arguments: | ||
- "@bitbag.mailchimp_plugin.handler.newsleter_subscription_handler" | ||
- "@bitbag_sylius_mailchimp_plugin.handler.newsleter_subscription_handler" | ||
tags: | ||
- { name: "kernel.event_listener", event: "sylius.customer.post_register", method: customerCreateEvent } | ||
- { name: "kernel.event_listener", event: "sylius.customer.pre_update", method: customerUpdateEvent } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
bitbag: | ||
mailchimp_plugin: | ||
bitbag_sylius_mailchimp_plugin: | ||
ui: | ||
newsletter: Newsletter | ||
subscribe: Subscribe | ||
your_email_address: Your email address | ||
subscribed_successfully: You are now subscribed to the newsletter. | ||
invalid_csrf_token: Submited CSRF token is invalid. | ||
invalid_csrf_token: Submited CSRF token is invalid. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
bitbag: | ||
mailchimp_plugin: | ||
bitbag_sylius_mailchimp_plugin: | ||
ui: | ||
newsletter: Newsletter | ||
subscribe: Subskrybuj | ||
your_email_address: Twój adres email | ||
subscribed_successfully: Zostałeś zapisany do newslettera. | ||
invalid_csrf_token: Przesłany token CSRF jest nieprawidłowy. Prosimy spróbować ponownie. | ||
invalid_csrf_token: Przesłany token CSRF jest nieprawidłowy. Prosimy spróbować ponownie. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bitbag: | ||
mailchimp_plugin: | ||
bitbag_sylius_mailchimp_plugin: | ||
ui: | ||
invalid_email: The submitted email address is not valid. | ||
email_not_blank: Please fill the email field. | ||
unique_email: Given email address is already subscribed to the newsletter. | ||
unique_email: Given email address is already subscribed to the newsletter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bitbag: | ||
mailchimp_plugin: | ||
bitbag_sylius_mailchimp_plugin: | ||
ui: | ||
invalid_email: Het ingediende e-mailadres is niet geldig. | ||
email_not_blank: Vul het e-mailveld in. | ||
unique_email: Ingediende e-mailadres is al ingeschreven op de nieuwsbrief. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bitbag: | ||
mailchimp_plugin: | ||
bitbag_sylius_mailchimp_plugin: | ||
ui: | ||
invalid_email: Przesłany adres email nie jest prawidłowy. | ||
email_not_blank: Proszę podać adres email. | ||
unique_email: Na podany adres email zarejestrowana jest już subskrybcja newslettera. | ||
unique_email: Na podany adres email zarejestrowana jest już subskrybcja newslettera. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<form action="{{ path('bitbag_mailchimp_plugin_newsletter_subscribe') }}" method="POST" class="ui form" id="footer-newsletter-form"> | ||
<form action="{{ path('bitbag_sylius_mailchimp_plugin_newsletter_subscribe') }}" method="POST" class="ui form" id="footer-newsletter-form"> | ||
<div class="success-element"></div> | ||
<div class="validation-element"></div> | ||
<div class="inline field"> | ||
<input type="text" | ||
id="newsletter-email" name="email" | ||
placeholder="{{ 'bitbag.mailchimp_plugin.your_email_address'|trans }}" | ||
placeholder="{{ 'bitbag_sylius_mailchimp_plugin.ui.your_email_address'|trans }}" | ||
/> | ||
<input type="hidden" id="newsletter-token" name="_token" value="{{ csrf_token('newsletter') }}"> | ||
<button title="{{ 'bitbag.mailchimp_plugin.subscribe' }}" type="submit" class="ui button"> | ||
{{ 'bitbag.mailchimp_plugin.subscribe'|trans }} | ||
<button title="{{ 'bitbag_sylius_mailchimp_plugin.ui.subscribe' }}" type="submit" class="ui button"> | ||
{{ 'bitbag_sylius_mailchimp_plugin.ui.subscribe'|trans }} | ||
</button> | ||
</div> | ||
</form> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.