ByGroupController
in package
Controller responsible for handling the display of content by groups.
This controller fetches nodes and categorizes them by a specific taxonomy term, then displays them using a custom accordion built by the helper function.
Table of Contents
Methods
- byGroup() : array<string|int, mixed>
- Builds a render array for displaying nodes categorized by taxonomy terms in an accordion.
Methods
byGroup()
Builds a render array for displaying nodes categorized by taxonomy terms in an accordion.
public
byGroup() : array<string|int, mixed>
This method retrieves nodes from the database that are tagged with a specific taxonomy term (guide group). It then organizes these nodes by their taxonomy term, constructs links to each node, and finally displays this organized list in an accordion format on the page.
Tags
Return values
array<string|int, mixed> —A render array that Drupal will use to render the categorized content in an accordion format.