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
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

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