Add layout builder support for service blocks

This is a recreation of the PR on GitHub https://github.com/localgovdrupal/localgov_services/pull/236

Changes the way services blocks get the current node, by changing from using the current route in the constructor and using a context mapping for the node route. This allows the correct contents of the blocks to display in other modules such as layout builder.

To achive this, the provided blocks will need to be updated on existing sites with the update hook provided, this will add the required node context to the CTA, releated links and releated topics blocks. The existing $this->node method is still present for backward compatability for other blocks that extend servicesBlockBase until they are updated to use the node route context value.

Merge request reports

Loading