Steal, steal, steal from my old presentations
This commit is contained in:
parent
6ce773f7c5
commit
199da5ba07
2 changed files with 91 additions and 1 deletions
|
@ -48,3 +48,67 @@ contributed-module-ideas
|
|||
|
||||
You are having an effect on the world. Or at least your local site.
|
||||
|
||||
|
||||
## Getting help
|
||||
|
||||
The Internet.
|
||||
|
||||
It's good.
|
||||
|
||||
|
||||
### Tip: Looking up Hooks
|
||||
|
||||
We can look up hook definitions and their function signatures the same way we look up Drupal functions, at api.drupal.org:
|
||||
|
||||
api.drupal.org/hook_help
|
||||
|
||||
api.drupal.org
|
||||
drupalcontrib.org
|
||||
|
||||
|
||||
### Examples project
|
||||
|
||||
[drupal.org/project/examples](https://www.drupal.org/project/examples)
|
||||
|
||||
|
||||
Tip: grep
|
||||
|
||||
grep -nHR module_implements_alter .
|
||||
|
||||
./includes/module.inc:646: if ($hook != 'module_implements_alter') {
|
||||
|
||||
./modules/system/system.api.php:1775:function hook_module_implements_alter(&$implementations, $hook) {
|
||||
|
||||
|
||||
### Tip: Clear Caches
|
||||
|
||||
If something you do has no effect...
|
||||
|
||||
`drush cr`
|
||||
|
||||
|
||||
## Coding Standards
|
||||
|
||||
|
||||
drupal.org/coding-standards
|
||||
|
||||
Automated Nagging
|
||||
|
||||
drupal.org/project/coder
|
||||
|
||||
Automatic Adherence
|
||||
|
||||
drupal.org/project/grammar_parser
|
||||
(obsolete?)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The most important thing about this code is that i stole it.
|
||||
|
||||
I looked at how another module did it.
|
||||
|
||||
Implementing hooks is simply following patterns, it would be crazy not to copy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue