public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = [];
        $nextBehavior = null;
        foreach ($this->tables as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        if (count($behaviors)) {
            $nextBehavior = $behaviors[key($behaviors)][0];
        }

        return $nextBehavior;
    }
public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = [];
        $nextBehavior = null;
        foreach ($this->tables as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        if (count($behaviors)) {
            $nextBehavior = $behaviors[key($behaviors)][0];
        }

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

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