Commit 10ffa5da authored by gambry's avatar gambry Committed by boshtian

Issue #2926843 by Joao Sausen, gambry, maaty388: Missing dependencies for ContextReaction\Blocks

parent 85ac7dd5
......@@ -2,6 +2,7 @@
namespace Drupal\context\Plugin\ContextReaction;
use Drupal\Core\Plugin\PluginDependencyTrait;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\Core\Form\FormState;
......@@ -38,6 +39,10 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
use AjaxFormTrait;
use PluginDependencyTrait {
addDependency as addDependencyTrait;
}
/**
* An array of blocks to be displayed with this reaction.
*
......@@ -697,4 +702,16 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
protected function getSystemRegionList($theme, $show = REGIONS_ALL) {
return system_region_list($theme, $show);
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
$this->dependencies = parent::calculateDependencies();
foreach ($this->getBlocks() as $instance) {
$this->calculatePluginDependencies($instance);
}
return $this->dependencies;
}
}
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