Commit 63a75fee authored by mikelutz's avatar mikelutz Committed by bojanz
Browse files

Issue #3089266 by mikelutz: AddressDefaultFormatter must implement...

Issue #3089266 by mikelutz: AddressDefaultFormatter must implement \Drupal\Core\Security\TrustedCallbackInterface as of Drupal 8.8
parent b33dc1f6
...@@ -19,6 +19,15 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface; ...@@ -19,6 +19,15 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
// @codingStandardsIgnoreStart
// @todo remove this BC layer once support for Drupal 8.7 is sunsetted
if (interface_exists('\Drupal\Core\Security\TrustedCallbackInterface')) {
interface TrustedCallbackInterface extends \Drupal\Core\Security\TrustedCallbackInterface {}
}
else {
interface TrustedCallbackInterface {}
}
// @codingStandardsIgnoreStop
/** /**
* Plugin implementation of the 'address_default' formatter. * Plugin implementation of the 'address_default' formatter.
* *
...@@ -30,7 +39,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; ...@@ -30,7 +39,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }, * },
* ) * )
*/ */
class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryPluginInterface { class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryPluginInterface, TrustedCallbackInterface {
/** /**
* The address format repository. * The address format repository.
...@@ -285,4 +294,11 @@ class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryP ...@@ -285,4 +294,11 @@ class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryP
return $values; return $values;
} }
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return ['postRender'];
}
} }
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