Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZApproveCollaborationHandler Class Reference

Handles approval communication using the collaboration system. More...

Inheritance diagram for eZApproveCollaborationHandler:

## Public Member Functions
| __construct ()
| title ( $collaborationItem)
| content ( $collaborationItem)
| notificationParticipantTemplate ( $participantRole)
| readItem ( $collaborationItem, $viewMode=false)
| messageCount ( $collaborationItem)
| unreadMessageCount ( $collaborationItem)
| handleCustomAction ( $module, $collaborationItem)
Public Member Functions inherited from eZCollaborationItemHandler
| __construct ( $typeIdentifier, $typeName, $parameters=array())
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attribute)
| notificationTypes ()
| notificationCollectionHandling ()
| hasContentAttribute ( $collaborationItem, $attribute)
| contentAttribute ( $collaborationItem, $attribute)
| classes ()
| template ( $viewMode)
| templateName ()
| useMessages ( $collaborationItem)
| removeItem ( $collaborationItem)
| participantTypeString ( $participantType)
| participantRoleString ( $participantRole)
| roleName ( $collaborationID, $roleID)
| isCustomAction ( $name)
| hasCustomInput ( $name)
| customInput ( $name)

## Static Public Member Functions
static | contentObjectVersion ( $collaborationItem)
static | checkApproval ( $approvalID)
static | activateApproval ( $approvalID)
static | createApproval ( $contentObjectID, $contentObjectVersion, $authorID, $approverIDArray)
Static Public Member Functions inherited from eZCollaborationItemHandler
static | handleCollaborationEvent ( $event, $item, &$parameters)
static | ini ()
static | defaultRepositories ()
static | extensionRepositories ()
static | handlerRepositories ()
static | activeHandlers ()
static | instantiate ( $handler, $repositories=false)
static | fetchList ()

## Public Attributes
const | MESSAGE_TYPE_APPROVE = 1
| Approval message type. More...
const | STATUS_WAITING = 0
| Default status, no approval decision has been made. More...
const | STATUS_ACCEPTED = 1
| The contentobject was approved and will be published. More...
const | STATUS_DENIED = 2
| The contentobject was denied and will be archived. More...
const | STATUS_DEFERRED = 3
| The contentobject was deferred and will be a draft again for reediting. More...
Public Attributes inherited from eZCollaborationItemHandler
| $NotificationCollectionHandling
| $NotificationTypes
const | NOTIFICATION_COLLECTION_ONE_FOR_ALL = 1
const | NOTIFICATION_COLLECTION_PER_USER = 2
const | NOTIFICATION_COLLECTION_PER_PARTICIPATION_ROLE = 3
| $Info

## Detailed Description

Handles approval communication using the collaboration system.

The handler uses the fields data_int1, data_int2 and data_int3 to store information on the contentobject and the approval status.

- data_int1 - The content object ID
- data_int2 - The content object version
- data_int3 - The status of the approval, see defines.

Definition at line 24 of file ezapprovecollaborationhandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZApproveCollaborationHandler::__construct | ( |  | ) |

Definition at line 41 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemHandler\NOTIFICATION_COLLECTION_PER_PARTICIPATION_ROLE, and ezpI18n\tr().

## Member Function Documentation

## ◆ activateApproval()

static eZApproveCollaborationHandler::activateApproval | ( |  | $approvalID | ) |
| static

Returns
  makes sure the approval item is activated for all participants $approvalID.

Definition at line 137 of file ezapprovecollaborationhandler.php.

References eZCollaborationItem\fetch(), eZCollaborationItemParticipantLink\fetchParticipantList(), and eZCollaborationItem\STATUS_ACTIVE.

Referenced by eZApproveType\execute().

## ◆ checkApproval()

static eZApproveCollaborationHandler::checkApproval | ( |  | $approvalID | ) |
| static

Returns
  the status of the approval collaboration item $approvalID.

Definition at line 123 of file ezapprovecollaborationhandler.php.

References eZCollaborationItem\fetch().

Referenced by eZApproveType\checkApproveCollaboration().

## ◆ content()

eZApproveCollaborationHandler::content | ( |  | $collaborationItem | ) |

Returns
  the content of the collaborationitem.

Note
  This is specific to the item type, some might return an array and others an object.

Reimplemented from eZCollaborationItemHandler.

Definition at line 59 of file ezapprovecollaborationhandler.php.

## ◆ contentObjectVersion()

static eZApproveCollaborationHandler::contentObjectVersion | ( |  | $collaborationItem | ) |
| static

Returns
  the content object version object for the collaboration item $collaborationItem

Definition at line 83 of file ezapprovecollaborationhandler.php.

References eZContentObjectVersion\fetchVersion().

Referenced by eZApproveType\checkApproveCollaboration(), and handleCustomAction().

## ◆ createApproval()

static eZApproveCollaborationHandler::createApproval | ( |  | $contentObjectID,
|  |  | $contentObjectVersion,
|  |  | $authorID,
|  |  | $approverIDArray
| ) |  |
| static

Creates a new approval collaboration item which will approve the content object $contentObjectID with version $contentObjectVersion. The item will be added to the author $authorID and the approver array $approverIDArray.

Returns
  the collaboration item.

Definition at line 163 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemGroupLink\addItem(), eZCollaborationItemParticipantLink\create(), eZCollaborationItem\create(), eZCollaborationProfile\instance(), eZCollaborationItemParticipantLink\ROLE_APPROVER, eZCollaborationItemParticipantLink\ROLE_AUTHOR, and eZCollaborationItemParticipantLink\TYPE_USER.

Referenced by eZApproveType\createApproveCollaboration().

## ◆ handleCustomAction()

eZApproveCollaborationHandler::handleCustomAction | ( |  | $module,
|  |  | $collaborationItem
| ) |  |

Adds a new comment, approves the item or denies the item.

Reimplemented from eZCollaborationItemHandler.

Definition at line 199 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemMessageLink\addMessage(), contentObjectVersion(), eZCollaborationSimpleMessage\create(), eZUser\currentUser(), eZCollaborationItemHandler\customInput(), eZCollaborationItemParticipantLink\fetchParticipantList(), eZCollaborationItemHandler\isCustomAction(), eZCollaborationItemParticipantLink\ROLE_APPROVER, STATUS_ACCEPTED, STATUS_DENIED, and eZCollaborationItem\STATUS_INACTIVE.

## ◆ messageCount()

eZApproveCollaborationHandler::messageCount | ( |  | $collaborationItem | ) |

Returns
  the number of messages for the approve item.

Reimplemented from eZCollaborationItemHandler.

Definition at line 101 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemMessageLink\fetchItemCount().

## ◆ notificationParticipantTemplate()

eZApproveCollaborationHandler::notificationParticipantTemplate | ( |  | $participantRole | ) |

Reimplemented from eZCollaborationItemHandler.

Definition at line 66 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemParticipantLink\ROLE_APPROVER, and eZCollaborationItemParticipantLink\ROLE_AUTHOR.

## ◆ readItem()

eZApproveCollaborationHandler::readItem | ( |  | $collaborationItem,
|  |  | $viewMode = `false`
| ) |  |

Updates the last_read for the participant link.

Reimplemented from eZCollaborationItemHandler.

Definition at line 93 of file ezapprovecollaborationhandler.php.

## ◆ title()

eZApproveCollaborationHandler::title | ( |  | $collaborationItem | ) |

Returns
  the title of the collaboration item.

Reimplemented from eZCollaborationItemHandler.

Definition at line 54 of file ezapprovecollaborationhandler.php.

References ezpI18n\tr().

## ◆ unreadMessageCount()

eZApproveCollaborationHandler::unreadMessageCount | ( |  | $collaborationItem | ) |

Returns
  the number of unread messages for the approve item.

Reimplemented from eZCollaborationItemHandler.

Definition at line 109 of file ezapprovecollaborationhandler.php.

References eZCollaborationItemMessageLink\fetchItemCount().

## Member Data Documentation

## ◆ MESSAGE_TYPE_APPROVE

const eZApproveCollaborationHandler::MESSAGE_TYPE_APPROVE = 1

Approval message type.

Definition at line 27 of file ezapprovecollaborationhandler.php.

## ◆ STATUS_ACCEPTED

const eZApproveCollaborationHandler::STATUS_ACCEPTED = 1

The contentobject was approved and will be published.

Definition at line 33 of file ezapprovecollaborationhandler.php.

Referenced by eZApproveType\checkApproveCollaboration(), and handleCustomAction().

## ◆ STATUS_DEFERRED

const eZApproveCollaborationHandler::STATUS_DEFERRED = 3

The contentobject was deferred and will be a draft again for reediting.

Definition at line 39 of file ezapprovecollaborationhandler.php.

Referenced by eZApproveType\checkApproveCollaboration().

## ◆ STATUS_DENIED

const eZApproveCollaborationHandler::STATUS_DENIED = 2

The contentobject was denied and will be archived.

Definition at line 36 of file ezapprovecollaborationhandler.php.

Referenced by eZApproveType\checkApproveCollaboration(), and handleCustomAction().

## ◆ STATUS_WAITING

const eZApproveCollaborationHandler::STATUS_WAITING = 0

Default status, no approval decision has been made.

Definition at line 30 of file ezapprovecollaborationhandler.php.

Referenced by eZApproveType\checkApproveCollaboration().

The documentation for this class was generated from the following file:

- ezapprovecollaborationhandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.