Craft\Workflow_SubmissionsService::rejectSubmission PHP Method

rejectSubmission() public method

public rejectSubmission ( Workflow_SubmissionModel $model )
$model Workflow_SubmissionModel
    public function rejectSubmission(Workflow_SubmissionModel $model)
    {
        $settings = craft()->workflow->getSettings();
        // Fire an 'onBeforeRejectSubmission' event
        $event = new Event($this, array('submission' => $model));
        $this->onBeforeRejectSubmission($event);
        // Allow event to cancel submission saving
        if (!$event->performAction) {
            return false;
        }
        $result = $this->save($model);
        // Fire an 'onSaveSubmission' event
        $this->onRejectSubmission(new Event($this, array('submission' => $model)));
        // Trigger notification to editor
        if ($settings->editorNotifications) {
            $this->_sendEditorNotificationEmail($model);
        }
        return $result;
    }