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

        // Request via ImportForm where TemplateVersion is already set, so unset it
        $posted = Controller::curr()->getRequest()->postVars();
        if (isset($posted['_CsvFile']) && $this->TemplateVersion) {
            $this->TemplateVersion = null;
        }
        if ($this->numChildren() == 0 && $this->Template && !$this->TemplateVersion) {
            $this->getWorkflowService()->defineFromTemplate($this, $this->Template);
        }
    }
public function onAfterWrite()
    {
        parent::onAfterWrite();

        // Request via ImportForm where TemplateVersion is already set, so unset it
        $posted = Controller::curr()->getRequest()->postVars();
        if (isset($posted['_CsvFile']) && $this->TemplateVersion) {
            $this->TemplateVersion = null;
        }
        if ($this->numChildren() == 0 && $this->Template && !$this->TemplateVersion) {
            $this->getWorkflowService()->defineFromTemplate($this, $this->Template);
        }
    }
public function onAfterWrite ( ) { parent :: onAfterWrite ( ) ; // Request via ImportForm where TemplateVersion is already set, so unset it $ posted = Controller :: curr ( ) -> getRequest ( ) -> postVars ( ) ; if ( isset ( $ posted [ '_CsvFile' ] ) && $ this -> TemplateVersion ) { $ this -> TemplateVersion = null ; } if ( $ this -> numChildren ( ) == 0 && $ this -> Template && ! $ this -> TemplateVersion ) { $ this -> getWorkflowService ( ) -> defineFromTemplate ( $ this , $ this -> Template ) ; } }
After we've been written, check whether we've got a template and to then
create the relevant actions etc.
After we ve been written check whether we ve got a template and to then create the relevant actions etc .