Part 3: Rendering an Unmanaged File in a Block
In Part 2, we built a service that can locate unmanaged files and return one at random. In this part, we’ll expose that functionality as a block plugin. Blocks are a powerful way to make custom logic reusable: site builders can place them anywhere through the Drupal block layout interface, no code changes required.