Created
May 3, 2012 03:39
-
-
Save jedateach/2582956 to your computer and use it in GitHub Desktop.
Running Total Extension for DataObjectSet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RunningTotalExtension extends Extension{ | |
private static $runningtotal = 0; | |
function RunningTotal(){ | |
return self::$runningtotal ++; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% control MyObjects %> | |
$Me.RunningTotal | |
<% end_control %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This won't work... the running total should be a method on your DataObject. ...which is what $Me refers to.