We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86246d8 commit 813e781Copy full SHA for 813e781
src/Plugin/PreviewLinkAutopopulate/Subsites.php
@@ -3,6 +3,7 @@
3
namespace Drupal\localgov_subsites\Plugin\PreviewLinkAutopopulate;
4
5
use Drupal\localgov_subsites\Plugin\Block\SubsitesHierarchyTrait;
6
+use Drupal\node\NodeInterface;
7
use Drupal\preview_link\PreviewLinkAutopopulatePluginBase;
8
9
/**
@@ -28,6 +29,7 @@ class Subsites extends PreviewLinkAutopopulatePluginBase {
28
29
* {@inheritdoc}
30
*/
31
public function getPreviewEntities(): array {
32
+ assert($this->entity instanceof NodeInterface);
33
return $this->getFlattenedSubsiteHierarchy($this->entity);
34
}
35
0 commit comments