Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • Workflow
  • WorkflowAction
  • WorkflowActions
  • WorkflowAllocation
  • WorkflowAllocations
  • WorkflowArtAllocation
  • WorkflowArtAllocations
  • WorkflowItem
  • WorkflowItems
  • Workflows
  • WorkflowTask
  • WorkflowTasks
  • WorkflowUserSequence
  • WorkflowUserSequences

Functions

  • createNewWorkflow
  • doWorkflowAction
  • editWorkflowStep
  • getActionSelect
  • getCatLang
  • getCurrentUserSequence
  • getLastWorkflowStatus
  • getTimeUnitSelector
  • getUsers
  • getWorkflowForCat
  • getWorkflowForUserSequence
  • getWorkflowList
  • getWorkflowUsers
  • isCurrentEditor
  • piworkflowAllowArticleEdit
  • piworkflowCategoryColumns
  • piworkflowCategoryRenderColumn
  • piworkflowCreateTasksFolder
  • piworkflowProcessActions
  • piworkflowProcessArticleColumns
  • piworkflowRenderAction
  • piworkflowRenderColumn
  • prepareWorkflowItems
  • setUserSequence
  • workflowInherit
  • workflowSelect
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * This file contains the management of per-workflowitem actions.
  4:  *
  5:  * @package Plugin
  6:  * @subpackage Workflow
  7:  * @author Timo Hummel
  8:  * @copyright four for business AG <www.4fb.de>
  9:  * @license http://www.contenido.org/license/LIZENZ.txt
 10:  * @link http://www.4fb.de
 11:  * @link http://www.contenido.org
 12:  */
 13: 
 14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 15: 
 16: /**
 17:  * Management of per-workflowitem actions.
 18:  *
 19:  * @package Plugin
 20:  * @subpackage Workflow
 21:  */
 22: class WorkflowActions extends ItemCollection {
 23: 
 24:     /**
 25:      * Constructor Function
 26:      */
 27:     public function __construct() {
 28:         global $cfg;
 29:         parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
 30:         $this->_setItemClass("WorkflowAction");
 31:     }
 32: 
 33:     public function get($idworkflowitem, $action) {
 34:         $this->select("idworkflowitem = " . (int) $idworkflowitem . " AND action = '" . $this->escape($action) . "'");
 35:         if ($this->next()) {
 36:             return true;
 37:         } else {
 38:             return false;
 39:         }
 40:     }
 41: 
 42:     public function getAvailableWorkflowActions() {
 43:         $availableWorkflowActions = array(
 44:             "publish" => i18n("Publish article", "workflow"),
 45:             "lock" => i18n("Lock article", "workflow"),
 46:             "last" => i18n("Move back to last editor", "workflow"),
 47:             "reject" => i18n("Reject article", "workflow"),
 48:             "articleedit" => i18n("Edit article content", "workflow"),
 49:             "propertyedit" => i18n("Edit article properties", "workflow"),
 50:             "templateedit" => i18n("Edit template", "workflow"),
 51:             "revise" => i18n("Revise article", "workflow")
 52:         );
 53: 
 54:         return ($availableWorkflowActions);
 55:     }
 56: 
 57:     public function set($idworkflowitem, $action) {
 58:         $this->select("idworkflowitem = " . (int) $idworkflowitem . " AND action = '" . $this->escape($action) . "'");
 59:         if (!$this->next()) {
 60:             $newitem = $this->createNewItem();
 61:             $newitem->setField("idworkflowitem", $idworkflowitem);
 62:             $newitem->setField("action", $action);
 63:             $newitem->store();
 64:         }
 65:     }
 66: 
 67:     public function remove($idworkflowitem, $action) {
 68:         $this->select("idworkflowitem = " . (int) $idworkflowitem . " AND action = '" . $this->escape($action) . "'");
 69:         if (($item = $this->next()) !== false) {
 70:             $this->delete($item->getField("idworkflowaction"));
 71:         }
 72:     }
 73: 
 74:     public function select($where = "", $group_by = "", $order_by = "", $limit = "") {
 75:         global $client;
 76: 
 77:         return parent::select($where, $group_by, $order_by, $limit);
 78:     }
 79: 
 80: }
 81: 
 82: /**
 83:  * Class WorkflowAction
 84:  * Class for a single workflow action
 85:  *
 86:  * @package Plugin
 87:  * @subpackage Workflow
 88:  * @author Timo A. Hummel <Timo.Hummel@4fb.de>
 89:  * @version 0.1
 90:  * @copyright four for business 2003
 91:  */
 92: class WorkflowAction extends Item {
 93: 
 94:     /**
 95:      * Constructor Function
 96:      */
 97:     public function __construct() {
 98:         global $cfg;
 99: 
100:         parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
101:     }
102: 
103: }
104: 
105: ?>
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0