public function onBeforeWrite()
    {
        parent::onBeforeWrite();

        $vars = $this->record;

        if (isset($vars['DirectUpdate'])) {
            // Unset now so that we don't end up in an infinite loop!
            unset($this->record['DirectUpdate']);
            $this->updateWorkflow($vars);
        }
    }
public function onBeforeWrite()
    {
        parent::onBeforeWrite();

        $vars = $this->record;

        if (isset($vars['DirectUpdate'])) {
            // Unset now so that we don't end up in an infinite loop!
            unset($this->record['DirectUpdate']);
            $this->updateWorkflow($vars);
        }
    }
public function onBeforeWrite ( ) { parent :: onBeforeWrite ( ) ; $ vars = $ this -> record ; if ( isset ( $ vars [ 'DirectUpdate' ] ) ) { // Unset now so that we don't end up in an infinite loop! unset ( $ this -> record [ 'DirectUpdate' ] ) ; $ this -> updateWorkflow ( $ vars ) ; } }
See if we've been saved in context of managing the workflow directly
See if we ve been saved in context of managing the workflow directly