Skip to content

Instantly share code, notes, and snippets.

@chx
Created June 3, 2012 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chx/2861969 to your computer and use it in GitHub Desktop.
Save chx/2861969 to your computer and use it in GitHub Desktop.
config presave
function presave() {
module_invoke_all('config_presave', $this);
$hook = 'config_presave';
$part = strtok($this->name, '.');
do {
$hook .= '_' . $part;
module_invoke_all($hook, $this);
} while ($part = strtok('.'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment