raoul2000\workflow\base\SimpleWorkflowBehavior::firePendingEvents PHP Method

firePendingEvents() private method

When the status is changed during a save operation, all the "after" events must be sent after the owner model has been saved. This method is invoked on events ActiveRecord::EVENT_AFTER_UPDATE and ActiveRecord::EVENT_AFTER_INSERT.
private firePendingEvents ( )
    private function firePendingEvents()
    {
        if (!empty($this->_pendingEvents)) {
            foreach ($this->_pendingEvents as $event) {
                $this->owner->trigger($event->name, $event);
            }
            $this->_pendingEvents = [];
            if ($this->getStatusAccessor() != null) {
                $this->_statusAccessor->commitStatus($this->owner);
            }
        }
    }