Conditional Flags
Categories
Component ID
1768716
Component name
Conditional Flags
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
3168
Component created
Component changed
Component body
Module description
This module provides an extra API to Flag module, for custom conditions between flags, for example:
When the have_seen flag is been "flagged", the want_to_watch flag must be "unflagged"
AND
When the want_to_watch flag is been "flagged", the have_seen flag must be "unflagged"
And the hook for that is:
/**
* Implements hook_conditional_flags_conditions().
*/
function custom_conditional_flags_conditions() {
return array(
'have_seen' => array(
'flag' => array('want_to_watch' => 'unflag'),
),
'want_to_watch' => array(
'flag' => array('have_seen' => 'unflag'),
),
);
}
Requirements / Dependencies
Acknowledgements
TODO
- Write a Test
- Make a UI for site builders
Thanks
Sponsored by Taller.
