Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch adds a "Custom platform tasks" text entry field to the Hosting Settings page, which allows for the entry of a space-delimited list of additional platform task names that should be listed in the platform task list of a platform node display page. Currently, the list of allowed platform tasks is restricted by a hard-coded list in the 'hosting_task.module' file. Our use-case is that we created a local platform task that needed to be displayed to our users--part of a local module that is equivalent to the Hosting Tasks Extra module.
Comment | File | Size | Author |
---|---|---|---|
#6 | custom_platform_task_setting-#2887481-comment_#6.patch | 2.74 KB | kfolsom |
#2 | custom_platform_task_setting-#2887481-comment_#2.patch | 2.75 KB | kfolsom |
Comments
Comment #2
kfolsom CreditAttribution: kfolsom commentedComment #3
colanExtra whitespace at the end of all 3 of these lines.
Extra whitespace at end.
Comment #4
kfolsom CreditAttribution: kfolsom commentedGood point on just adding to the original form. My thought process was to introduce new code blocks while affecting existing blocks as little as possible, but that does lead to added complexity. I'd be glad to re-work the patch. Other than that and the white space (which I'll eventually remember to check for!), does this feature addition seem worthwhile?
Thanks,
Keith
Comment #5
kfolsom CreditAttribution: kfolsom commentedActually, looking back to when I did this work, I was also following the example of the hook_form_alter() implemented by the "Platforms" module in hosting_platform.module. It uses a hook_form_alter() to add the "Platform base path" setting. Another consideration is that all my changes were limited to a single module rather than being made in both "Hosting tasks" and "Hosting". The hook also keeps the setting with the module it is relevant to.
So I'd prefer to stick with the use of hook_form_alter() for the patch.
Thanks,
Keith
Comment #6
kfolsom CreditAttribution: kfolsom commentedThe patch with whitespace fixed. Thanks for catching that.
Keith