Loading src/Plugin/Field/FieldFormatter/AddressDefaultFormatter.php +17 −1 Changes for src/Plugin/Field/FieldFormatter/AddressDefaultFormatter.php: 17 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,6 +19,15 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Render\Element; 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. * Loading @@ -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. Loading Loading @@ -285,4 +294,11 @@ class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryP return $values; } /** * {@inheritdoc} */ public static function trustedCallbacks() { return ['postRender']; } } Loading
src/Plugin/Field/FieldFormatter/AddressDefaultFormatter.php +17 −1 Changes for src/Plugin/Field/FieldFormatter/AddressDefaultFormatter.php: 17 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,6 +19,15 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Render\Element; 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. * Loading @@ -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. Loading Loading @@ -285,4 +294,11 @@ class AddressDefaultFormatter extends FormatterBase implements ContainerFactoryP return $values; } /** * {@inheritdoc} */ public static function trustedCallbacks() { return ['postRender']; } }