H5P integration done as static methods instead of services

Created on 5 August 2019, about 6 years ago
Updated 24 July 2025, 20 days ago

I have some things I need to do with H5P that the module doesn't support, and doesn't give me any way of overriding or altering. The initialization functions, including those that set the actor information, are all static methods, which doesn't support the spirit of The Drupal Way of allowing other modules to extend and alter contrib functionality.

I propose that the H5PDrupal class be converted into a service so that other modules can decorate and extend and alter the functions that call or initialize H5P functionality.

✨ Feature request
Status

Needs review

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States franksj

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States illeace

    I can confirm that in the latest 2.0.0-alpha6 release, the issue the OP mentions still exists.

  • πŸ‡ΊπŸ‡ΈUnited States frob US

    This would be nice if it had some tests to go with it. The patch seems okay but it includes a bunch of code style changes that make it difficult to evaluate the changes. I'd say this isn't something that needs to happen as a part of getting a stable beta out but if the patch can go through some manual testing and gets RTBC then it shouldn't break anything to include it.

    Does anyone want to turn this into a MR to aid in the review?

Production build 0.71.5 2024