Commit 3af2941e authored by catch's avatar catch

Issue #1889244 by klausi: Fixed Remove JSON-LD encoder array as there is only one JSON-LD encoder.

parent 4aaa7252
......@@ -44,11 +44,6 @@ public function build(ContainerBuilder $container) {
'jsonld' => 'Drupal\jsonld\JsonldRdfSchemaNormalizer',
),
);
// Encoders can only specify which format they support in
// Encoder::supportsEncoding().
$encoders = array(
'jsonld' => 'Drupal\jsonld\JsonldEncoder',
);
// Add Normalizers to service container.
foreach ($normalizers as $supported_class => $formats) {
......@@ -60,11 +55,10 @@ public function build(ContainerBuilder $container) {
}
}
// Add Encoders to service container.
foreach ($encoders as $format => $encoder_class) {
$container->register("serializer.encoder.{$format}", $encoder_class)
->addTag('encoder', array('priority' => $priority));
}
// Add the encoder to the service container. Encoders can only specify which
// format they support in Encoder::supportsEncoding().
$container->register('serializer.encoder.jsonld', 'Drupal\jsonld\JsonldEncoder')
->addTag('encoder', array('priority' => $priority));
$container->register('jsonld.subscriber', 'Drupal\jsonld\EventSubscriber\JsonldSubscriber')
->addTag('event_subscriber');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment