public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = array();
        foreach ($this->getTables() as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        foreach ($behaviors as $behaviorList) {
            foreach ($behaviorList as $behavior) {
                return $behavior;
            }
        }
    }
public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = array();
        foreach ($this->getTables() as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        foreach ($behaviors as $behaviorList) {
            foreach ($behaviorList as $behavior) {
                return $behavior;
            }
        }
    }
public function getNextTableBehavior ( ) { // order the behaviors according to Behavior::$tableModificationOrder $ behaviors = array ( ) ; foreach ( $ this -> getTables ( ) as $ table ) { foreach ( $ table -> getBehaviors ( ) as $ behavior ) { if ( ! $ behavior -> isTableModified ( ) ) { $ behaviors [ $ behavior -> getTableModificationOrder ( ) ] [ ] = $ behavior ; } } } ksort ( $ behaviors ) ; foreach ( $ behaviors as $ behaviorList ) { foreach ( $ behaviorList as $ behavior ) { return $ behavior ; } } }
Get the next behavior on all tables, ordered by behavior priority,
and skipping the ones that were already executed,

@return Behavior
Get the next behavior on all tables ordered by behavior priority and skipping the ones that were already executed