Commit a9ed1512 authored by paulocs's avatar paulocs Committed by paulocs

Issue #3158830 by paulocs, MaxMendez: Render #pre_render callbacks must be...

Issue #3158830 by paulocs, MaxMendez: Render #pre_render callbacks must be methods of a class that implements TrustedCallbackInterface
parent 54b5f8dd
......@@ -2,4 +2,4 @@ name: Context
description: 'Set conditions and configure reactions that should be implemented when conditions pass.'
package: Context
type: module
core_version_requirement: ^8 || ^9
core_version_requirement: ^8.8 || ^9
......@@ -28,6 +28,7 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Plugin\Context\ContextHandlerInterface;
use Drupal\Core\Plugin\Context\ContextRepositoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Security\TrustedCallbackInterface;
/**
* Provides a content reaction that will let you place blocks in the current
......@@ -38,7 +39,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* label = @Translation("Blocks")
* )
*/
class Blocks extends ContextReactionPluginBase implements ContainerFactoryPluginInterface {
class Blocks extends ContextReactionPluginBase implements ContainerFactoryPluginInterface, TrustedCallbackInterface{
use AjaxFormTrait;
......@@ -734,4 +735,12 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
return $this->dependencies;
}
/**
* {@inheritdoc}
*/
public static function trustedCallbacks()
{
return ['preRenderBlock'];
}
}
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