Bin will be removed on June 1, 2014 in favor of http://gist.github.com. Please save all your pastes before then. So long, and thanks for all the fish!×

treeplus

View Paste
  1. <?php
  2. /**
  3.  * Behavior to calculate and save depth of a record in MPTT
  4.  * Based on TreePlus beh...
TreePlus Behavior
View Paste
  1. class TreePlusBehavior extends ModelBehavior {
  2.  
  3. /**
  4.  * Defaults
  5.  *
  6.  * @var array
  7.  * @access...
Enhancement to tree behavior which saves "depth" for each record. Original work by AD7six, modifi...