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.
Problem/Motivation
To avoid installing module without libraries I suggest adding hook_requirements() in the .install file. This will allow being sure that module will be installed only in a case when library added. Without the library, this module does not make sense to install.
Proposed resolution
Add hook_requirements().
Remaining tasks
Review patch.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#6 | colorbutton-hook-requirements-2881819-6.patch | 1003 bytes | ddrozdik |
Comments
Comment #2
ddrozdik CreditAttribution: ddrozdik as a volunteer and at FFW for Open Y commentedHere is a patch.
Comment #3
hamrant CreditAttribution: hamrant at DEWEB Studio, Drupal Ukraine Community, FFW, Open Y for Drupal Ukraine Community commentedLooks good, one minor fix:
Please delete whitespace on 23 line.
Comment #4
ddrozdik CreditAttribution: ddrozdik as a volunteer and at FFW for Open Y commentedHere is updated patch with removed whitespace on 23 line.
Comment #5
hamrant CreditAttribution: hamrant at DEWEB Studio, Drupal Ukraine Community, FFW, Open Y for Drupal Ukraine Community commentedComment #6
ddrozdik CreditAttribution: ddrozdik as a volunteer and at FFW, Drupal Ukraine Community for Open Y commentedI found an issue with the latest patсh. Here is update version.
Comment #8
ddrozdik CreditAttribution: ddrozdik as a volunteer and at FFW, Drupal Ukraine Community for Open Y commented