This project is obsolete, check out Coffee instead!
Do was inspired by Gnome Do and is an extensible tool for quick & painless Drupal site administration and development.
Usage
Press Ctrl + Space to open the dialog and type a command (this shortcut can be configured). Hit Enter to execute it.
Examples
A command be followed by unlimited parameters, separated by spaces:
command parameter1 parameter2 parameter3...
The following commands are natively supported (modules can define their own! See "Hooks" below):
- alias
- You can define aliases to create even simpler shortcuts for commonly used functions. Accepts two parameters: "alias" and "command". For example:
alias cc cache_clear_all - goto
- Redirect to an internal Drupal path
- cc
- Flush all caches
- drush
- Forward commands to Drush!
Hooks!
Use hook_do() to extend Do and create your own shortcuts and custom functionality.
In order to define a command, implement hook_do():
// array keys are optional and act as aliases for the command
function mymodule_do() {
return array(
'myfunction
'my_alias' => 'other_function'
);
}Now, implement the function:
// commands get resolved to "MODULENAME_COMMAND"
function mymodule_myunction() {
// do something amazing
return array(
'ok' => FALSE, // signal failure
'msg' => t('Function executed!'), // display message on screen
'redirect' => 'user' // redirect to this path, can also be an absolute URL
);
}
function mymodule_other_function($param1, $param2) {
// all parameters get forwarded here
return array(
'ok' => TRUE,
'redirect' => TRUE, // TRUE means page gets refreshed
);
}Now you can quickly access your functions:
// all additional parameters get forwarded to your function
mymodule my_alias param1 param2Motivation
The basic idea is to offer an unobtrusive, easily-accessible & flexible shortcut shell to complement Drush for more hands-on stuff like navigation, toggling settings and exposing functionality from modules for quick and convenient access.
Get involved!
This went from idea to release very quickly and is still a bit rough around the edges, despite being surprisingly stable! All contributions are welcome, be it bug reports, feature requests, patches, you name it!
Help this project grow!
Downloads
Recommended releases
Development releases
Project Information
- Maintenance status: Unsupported
- Development status: No further development
- Module categories: Administration
- Reported installs: 4 sites currently report using this module. View usage statistics.
- Downloads: 324
- Last modified: April 2, 2012