Problem/Motivation
I would like to alter the CSHS option items. E.g. altering the labels for additional information.
Steps to reproduce
Try to alter the label of an item of CshsOption. You'll fail.
Proposed resolution
Introduce a simple hook.
Issue fork cshs-3560350
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jepster_Please review the MR.
Comment #6
joseph.olstadWould be best if this was using dependency injection as I attempted to do prior to the last commit. Appreciate it if someone fixed this.
Comment #7
joseph.olstad@lkmorlan, I see your change blasted my commits completely and the history of changes (using git rebase I assume). While my change failed the test, we're now back to non-Dependency Injection.
Comment #8
liam morlandThe previous version of the merge request automatically gets tagged so nothing is lost.
I have added dependency injection to the merge request.
Update: Sorry, I thought it was using the autowire trait because there is no
::create().CshsOptionshould be a service so that there is a way to do the injection.Comment #9
joseph.olstad@lkmorland, I believe you've possibly enabled rebase by default in your local git configuration which likely explains what happened to my commits (zapped). I purposely disable rebase with the FALSE option and only use it explicitly which is extremely rare.
With that said ya it's not working and yes probably CshsOption needs refactoring to become a service.
Comment #10
liam morlandNothing has been lost. The tag
previous/3560350-introduce-hook-for/2025-12-05-1is pointing to what it was like before I pushed. That version does not have fully-implmented dependency injection. That is why tests do not pass on that version.I suggest that this be done without dependency injection. Conversion to a service with dependency injection can be done in a follow-up.
Comment #12
joseph.olstadComment #14
joseph.olstadhttps://www.drupal.org/project/cshs/releases/4.0.5