function nodeactivity_activity_info in Activity 6
Same name and namespace in other branches
- 5.4 contrib/nodeactivity/nodeactivity.module \nodeactivity_activity_info()
- 5.2 contrib/nodeactivity.module \nodeactivity_activity_info()
- 5.3 contrib/nodeactivity/nodeactivity.module \nodeactivity_activity_info()
Activity definition file
This defines what hooks activity module should use
File
- contrib/
nodeactivity/ nodeactivity.module, line 8
Code
function nodeactivity_activity_info() {
$types = node_get_types();
foreach ($types as $type) {
$token_types[$type->type] = $type->name;
}
return array(
'ops' => array(
'insert' => t('Create'),
'update' => t('Update'),
'delete' => t('Delete'),
),
'types' => $token_types,
'roles' => array(
'author' => array(
'#name' => t('Author'),
'#description' => t('The person who created the node.'),
'#default' => t('[author] [operation]d the [node-type] [node-link]'),
),
// This is what corresponds to ACTIVITY_ALL
'all' => array(
'#name' => t('All'),
'#description' => t('The general public.'),
'#default' => t('[author-all] [operation]d the [node-type] [node-link]'),
),
),
);
}