app/Http/Controllers/HomePageController.php
private function availableTreeBlocks(): Collection
    {
        return $this->module_service->findByInterface(ModuleBlockInterface::class, false, true)
            ->filter(static function (ModuleBlockInterface $block): bool {
                return $block->isTreeBlock();
            })
            ->mapWithKeys(static function (ModuleInterface $block): array {
                return [$block->name() => $block];
            });
    }
private function availableTreeBlocks(): Collection
    {
        return $this->module_service->findByInterface(ModuleBlockInterface::class, false, true)
            ->filter(static function (ModuleBlockInterface $block): bool {
                return $block->isTreeBlock();
            })
            ->mapWithKeys(static function (ModuleInterface $block): array {
                return [$block->name() => $block];
            });
    }
private function availableTreeBlocks ( ) : Collection { return $ this -> module_service -> findByInterface ( ModuleBlockInterface :: class , false , true ) -> filter ( static function ( ModuleBlockInterface $ block ) : bool { return $ block -> isTreeBlock ( ) ; } ) -> mapWithKeys ( static function ( ModuleInterface $ block ) : array { return [ $ block -> name ( ) => $ block ] ; } ) ; }
Get all the available blocks for a tree page.

@return Collection
@return ModuleBlockInterface[]
Get all the available blocks for a tree page .