This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 
<?php
defined('C5_EXECUTE') or die("Access Denied.");
/**
 * @package Workflow
 * @author Andrew Embler <[email protected]>
 * @copyright  Copyright (c) 2003-2012 concrete5. (http://www.concrete5.org)
 * @license    http://www.concrete5.org/license/     MIT License
 *
 */
class Concrete5_Model_WorkflowProgressAction extends Object {  
    
    protected $wrActionStyleClass = '';
    protected $wrActionStyleInnerButtonLeft = '';
    protected $wrActionStyleInnerButtonRight = '';
    protected $wrActionTask = '';
    protected $wrActionOnClick = '';
    protected $wrActionURL = '';
    protected $wrActionExtraButtonParameters = array();
    
    public function setWorkflowProgressActionStyleClass($class) {
        $this->wrActionStyleClass = $class;
    }
    public function setWorkflowProgressActionStyleInnerButtonLeftHTML($html) {
        $this->wrActionStyleInnerButtonLeft = $html;
    }
    public function setWorkflowProgressActionStyleInnerButtonRightHTML($html) {
        $this->wrActionStyleInnerButtonRight = $html;
    }
    public function setWorkflowProgressActionLabel($label) {
        $this->wrActionLabel = $label;
    }   
    public function setWorkflowProgressActionTask($wrActionTask) {
        $this->wrActionTask = $wrActionTask;
    }   
    public function setWorkflowProgressActionURL($wrActionURL) {
        $this->wrActionURL = $wrActionURL;
    }

    public function addWorkflowProgressActionButtonParameter($key, $value) {
        $this->wrActionExtraButtonParameters[$key] = $value;
    }
    
    public function getWorkflowProgressActionExtraButtonParameters() {
        return $this->wrActionExtraButtonParameters;
    }
    
    public function getWorkflowProgressActionStyleClass() {
        return $this->wrActionStyleClass;
    }
    public function getWorkflowProgressActionStyleInnerButtonLeftHTML() {
        return $this->wrActionStyleInnerButtonLeft;
    }
    public function getWorkflowProgressActionStyleInnerButtonRightHTML() {
        return $this->wrActionStyleInnerButtonRight;
    }
    public function getWorkflowProgressActionLabel() {
        return $this->wrActionLabel;
    }
    public function getWorkflowProgressActionTask() {
        return $this->wrActionTask;
    }
    public function getWorkflowProgressActionURL() {
        return $this->wrActionURL;
    }   
}

class Concrete5_Model_WorkflowProgressCancelAction extends Concrete5_Model_WorkflowProgressAction {
    
    public function __construct() {
        $this->setWorkflowProgressActionLabel(t('Cancel'));
        $this->setWorkflowProgressActionTask('cancel');
    }
    
}

class Concrete5_Model_WorkflowProgressApprovalAction extends Concrete5_Model_WorkflowProgressAction {
    
    public function __construct() {
        $this->setWorkflowProgressActionLabel(t('Approve'));
        $this->setWorkflowProgressActionTask('approve');
    }
    
}