DependenciesBlock.php in Entity Usage 8.2
File
tests/modules/entity_usage_test/src/Plugin/Block/DependenciesBlock.php
View source
<?php
namespace Drupal\entity_usage_test\Plugin\Block;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Block\BlockBase;
class DependenciesBlock extends BlockBase {
public function defaultConfiguration() {
return [
'dependencies' => [],
];
}
public function build() {
return [];
}
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
if ($this->configuration['dependencies']) {
$dependencies = NestedArray::mergeDeep($dependencies, $this->configuration['dependencies']);
}
return $dependencies;
}
}