oliverdavies.uk-drupal-old/web/modules/custom/blog/opdavies_blog.services.yml
Oliver Davies d7459ff30f Extract a PostPusher service to push the post
Extract a `PostPusher` service with an IFTTT implementation. That means
if this needs to change to use a different service in the future, the
IFTTT implementation can remain unchanged and a new implementation can
be added with its own form params etc.

This also makes this functionality easier to test as we can add a
`NullPostPusher` implementation for testing.

References #332
2021-01-01 22:45:23 +00:00

19 lines
513 B
YAML

services:
Drupal\opdavies_blog\EventSubscriber\PushBlogPostToSocialMedia:
autowire: true
tags:
- { name: event_subscriber }
Drupal\opdavies_blog\EventSubscriber\ReorderBlogTags:
tags:
- { name: event_subscriber }
Drupal\opdavies_blog\Repository\PostRepository:
autowire: true
Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher:
autowire: true
Drupal\opdavies_blog\Service\PostPusher\PostPusher:
alias: Drupal\opdavies_blog\Service\PostPusher\IftttPostPusher