A very simple module for Silverstripe 3.0 that adds up to 5 flags to any DataObject. The flags have by default no impact on your code. They are just markers for the administrator. For example the administrator could set the red flag for those records that need revision.
- adds up to 5 flags to any DataObject (Red,Orange,Yellow,Green,Blue)
- those flags are visible in your modeladmin with each flag being an action that you can enable/disable with a click
- download the module and unzip it. Make sure the folder name is "flags".
- add to your mysite/_config.php e.g.:
- By default you will get just a red flag. Add
public static $flags = array("Green","Red");to your DataObject if you want other (more then one) flags.
- run /dev/build
The flags don´t do anything by default, but of course you can use them in your code like:
$Products = Product::get()->filter("GreenFlag",1);
v1.0.0 (2012-11-07) : initial version