function quiz_action_info in Quiz 6.4
Same name and namespace in other branches
- 6.6 quiz.actions.inc \quiz_action_info()
- 6.3 quiz.actions.inc \quiz_action_info()
- 6.5 quiz.actions.inc \quiz_action_info()
- 7.6 quiz.module \quiz_action_info()
- 7 quiz.actions.inc \quiz_action_info()
- 7.4 quiz.actions.inc \quiz_action_info()
- 7.5 quiz.module \quiz_action_info()
Implementation of hook_action_info(). An action consists of two or three parts: (1) an action definition (returned by this hook), (2) a function which does the action (which by convention is named module + '_' + description of what the function does + '_action'), (3) and an optional form definition function that defines a configuration form (which has the name of the action with '_form' appended to it.)
File
- ./
quiz.actions.inc, line 28 - Example Action Implementation.
Code
function quiz_action_info() {
/*
//this is the name of your function to execute (custom_action)
//whatever your name here is you MUST have a function that matches
$info['custom_action'] = array(
//this is how we can filter the dropdown box on the quiz create page there will be an
//admin setting that will allow you to filter your dropdown results by 'type'
'type' => 'quiz',
//self explainatory
'description' => t('Custom Desription'),
//This allows you to configure your action with parameters through the admin
//If set to TRUE then you will need a custom form function for your options
'configurable' => TRUE,
//this will filter out actions based hooks, You will only use this if your going to get
//extremely advanced.
'hooks' => array(
'any' => TRUE,
),
);
*/
//return your array of actions
return $info;
}