You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Sorry, I'm in an ideas mood today after returning from Exeter sprint yesterday!)
Several civix jobs are boilerplate creating jobs. May we add to those via hooks implemented in extensions, for example?
Use case:
I'm seeing a lot of interest recently about Inlay. Creating a new inlay is pretty simple - I was able to demo it in 15 mins. But there is some boilerplate.
It struck me that if I could implement civix generate:inlay "Name of Inlay type" [OptionalShorterCodeName] it would be good for onboarding devs. Running that command would:
call civix generate:angular-module
call civix generate:angular-page x y
edit the ang/* files to insert some boilerplate tweaks.
create a Civi\Inlay\NameOfType.php class
somehow implement the required hook (currently I do this in hook_container, but I'd like to use HookInterface on the \Civi\Inlay\NameOfType class instead once I get it to work.
report the files created.
run a flush
I could see two options for implementation
I just do a PR here to ask to add this command to civix. You might feel that you don't want a pure-core tool polluted with pesky extensions' dirty work!
civix supports plugins, scans installed extensions to find classes implementing Civix\Plugin or such.
(a non-option): don't implement this with civix; just provide a cli/create-inlay.php script in the Inlay extension that does the work. This feels like duplicating logic though.
(another non-option): don't implement this with civix; just provide typical boilerplate code in the Inlay extension, e.g. under boilerplate/ and then give devs clear instructions.
I'm not sure how generic a requirement this is; perhaps inlay is a special case. Obviously this is not a high priority issue.
The text was updated successfully, but these errors were encountered:
(Sorry, I'm in an ideas mood today after returning from Exeter sprint yesterday!)
Several civix jobs are boilerplate creating jobs. May we add to those via hooks implemented in extensions, for example?
Use case:
I'm seeing a lot of interest recently about Inlay. Creating a new inlay is pretty simple - I was able to demo it in 15 mins. But there is some boilerplate.
It struck me that if I could implement
civix generate:inlay "Name of Inlay type" [OptionalShorterCodeName]
it would be good for onboarding devs. Running that command would:civix generate:angular-module
civix generate:angular-page x y
Civi\Inlay\NameOfType.php
class\Civi\Inlay\NameOfType
class instead once I get it to work.I could see two options for implementation
Civix\Plugin
or such.I'm not sure how generic a requirement this is; perhaps inlay is a special case. Obviously this is not a high priority issue.
The text was updated successfully, but these errors were encountered: