koala-framework / kwc-newsletter
Newsletter Component for Koala Framework
Installs: 2 463
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 6
Forks: 1
Open Issues: 1
Requires
- friendsofsymfony/rest-bundle: ^1.8
- koala-framework/koala-framework: ~5.1
- nelmio/api-doc-bundle: ^2.13
- sensio/framework-extra-bundle: ^3.0
- symfony/monolog-bundle: ^3.1
- symfony/symfony: ^2.8
This package is auto-updated.
Last update: 2024-12-18 14:32:45 UTC
README
Newsletter Component for Koala Framework
Installation
Runner
-
Add process-control to
config.ini
... processControl.kwcNewsletterStartRunner.cmd = symfony kwc_newsletter:start_runner ...
Bundle
-
Add Bundle to
AppKernel
public function registerBundles() { $bundles = array( ... new KwcNewsletter\Bundle\KwcNewsletterBundle() ); ... }
Subscriber API
-
Add routes to
routing.yml
kwc_newsletter_subscribers_api: resource: "@KwcNewsletterBundle/Resources/config/routing.yml"
-
Add security access_control entry to
security.yml
access_control: ... - { path: ^/api/v1/subscribers, roles: IS_AUTHENTICATED_ANONYMOUSLY } ...
Subscriber Open API
-
Enable FOS Rest Bundle's serializer in
config.yml
fos_rest: routing_loader: default_format: json include_format: false format_listener: enabled: true rules: - { path: '^/api/v1/open', fallback_format: json }
-
Add firewalls entry to
security.yml
firewalls: ... kwf_newsletter_bundle_open_api: pattern: ^/api/v1/open anonymous: true stateless: true simple_preauth: authenticator: apikey_authenticator provider: api_key_user_provider ...
-
Add security access_control entry to
security.yml
access_control: ... - { path: ^/api/v1/open, roles: ROLE_API } ...
-
Add backend admin route to
bootstrap.php
... $front = Kwf_Controller_Front_Component::getInstance();: $front->addControllerDirectory('vendor/koala-framework/kwc-newsletter/KwcNewsletter/Controller', 'kwc-newsletter_controller'); if ($front->getRouter() instanceof Kwf_Controller_Router) { $front->getRouter()->AddRoute('kwc-newsletter', new Zend_Controller_Router_Route( '/admin/kwc-newsletter/:controller/:action', array('module' => 'kwc-newsletter_controller', 'controller' =>'index', 'action' =>'index'))); } ...
-
Add component ACL to
app/Acl.php
... $this->setComponentAclClass('Component_Acl'); KwcNewsletter_Acl::initialise($this); ...