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
eZCollaborationItemHandler Class Reference

The class eZCollaborationItemHandler does. More...

Inheritance diagram for eZCollaborationItemHandler:

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

## Static Public Member Functions
static | handleCollaborationEvent ( $event, $item, &$parameters)
static | ini ()
static | defaultRepositories ()
static | extensionRepositories ()
static | handlerRepositories ()
static | activeHandlers ()
static | instantiate ( $handler, $repositories=false)
static | fetchList ()

## Public Attributes
| $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

The class eZCollaborationItemHandler does.

Definition at line 17 of file ezcollaborationitemhandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZCollaborationItemHandler::__construct | ( |  | $typeIdentifier,
|  |  | $typeName,
|  |  | $parameters = `array()`
| ) |  |

Initializes the handler with identifier and name and optional parameters

Parameters

  string | $typeIdentifier |
  string | $typeName |
  array | $parameters |

Definition at line 38 of file ezcollaborationitemhandler.php.

## Member Function Documentation

## ◆ activeHandlers()

static eZCollaborationItemHandler::activeHandlers | ( |  | ) |
| static

Returns
  an array with handler identifiers that are considered active.

Definition at line 493 of file ezcollaborationitemhandler.php.

References ini().

Referenced by fetchList().

## ◆ attribute()

eZCollaborationItemHandler::attribute | ( |  | $attribute | ) |

Returns
  the attribute $attribute if it exists or `null`.

Definition at line 73 of file ezcollaborationitemhandler.php.

References $Info, notificationTypes(), and eZDebug\writeError().

## ◆ attributes()

eZCollaborationItemHandler::attributes | ( |  | ) |

Definition at line 56 of file ezcollaborationitemhandler.php.

Referenced by hasAttribute().

## ◆ classes()

eZCollaborationItemHandler::classes | ( |  | ) |

Returns
  a list of classes this handler supports.

Definition at line 284 of file ezcollaborationitemhandler.php.

## ◆ content()

eZCollaborationItemHandler::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 in eZApproveCollaborationHandler.

Definition at line 403 of file ezcollaborationitemhandler.php.

## ◆ contentAttribute()

eZCollaborationItemHandler::contentAttribute | ( |  | $collaborationItem,
|  |  | $attribute
| ) |  |

Returns
  the attribute $attribute if it exists in the content data or `null`.

Definition at line 269 of file ezcollaborationitemhandler.php.

## ◆ customInput()

eZCollaborationItemHandler::customInput | ( |  | $name | ) |

Returns
  value of the custom input variable $name.

Definition at line 441 of file ezcollaborationitemhandler.php.

References eZHTTPTool\instance().

Referenced by eZApproveCollaborationHandler\handleCustomAction().

## ◆ defaultRepositories()

static eZCollaborationItemHandler::defaultRepositories | ( |  | ) |
| static

Returns
  an array with directories which acts as default collaboration repositories.

See also
  handlerRepositories

Definition at line 453 of file ezcollaborationitemhandler.php.

References ini().

Referenced by handlerRepositories().

## ◆ extensionRepositories()

static eZCollaborationItemHandler::extensionRepositories | ( |  | ) |
| static

Returns
  an array with directories which acts as collaboration extension repositories.

See also
  handlerRepositories

Definition at line 464 of file ezcollaborationitemhandler.php.

References ini().

Referenced by handlerRepositories().

## ◆ fetchList()

static eZCollaborationItemHandler::fetchList | ( |  | ) |
| static

Returns
  a list of collaboration handler objects.

See also
  instantiate, activeHandlers

Definition at line 555 of file ezcollaborationitemhandler.php.

References activeHandlers(), handlerRepositories(), and instantiate().

Referenced by eZCollaborationNotificationHandler\collaborationHandlers().

## ◆ handleCollaborationEvent()

static eZCollaborationItemHandler::handleCollaborationEvent | ( |  | $event,
|  |  | $item,
|  | & | $parameters
| ) |  |
| static

Handles a notification event for collaboration items.

Note
  The default implementation sends out a generic email.
  Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 120 of file ezcollaborationitemhandler.php.

References eZNotificationCollection\create(), eZNotificationEventHandler\EVENT_HANDLED, eZNotificationEventHandler\EVENT_SKIPPED, eZTemplate\factory(), eZCollaborationNotificationRule\fetchItemTypeList(), eZCollaborationItemParticipantLink\fetchParticipantList(), eZDB\instance(), eZCollaborationNotificationHandler\NOTIFICATION_HANDLER_ID, notificationParticipantTemplate(), eZCollaborationNotificationHandler\TRANSPORT, eZCollaborationItemParticipantLink\TYPE_USER, and eZDebug\writeError().

## ◆ handleCustomAction()

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

This function is called when a custom action is executed for a specific collaboration item. The module object is available in $module and the item in $collaborationItem.

Note
  The default does nothing, the function must be reimplemented in real handlers.

See also
  isCustomAction

Reimplemented in eZApproveCollaborationHandler.

Definition at line 414 of file ezcollaborationitemhandler.php.

## ◆ handlerRepositories()

static eZCollaborationItemHandler::handlerRepositories | ( |  | ) |
| static

Returns
  an array with directories which acts as collaboration repositories.

See also
  defaultRepositories, extensionRepositories

Definition at line 475 of file ezcollaborationitemhandler.php.

References eZExtension\baseDirectory(), defaultRepositories(), extensionRepositories(), and eZDir\path().

Referenced by fetchList(), and instantiate().

## ◆ hasAttribute()

eZCollaborationItemHandler::hasAttribute | ( |  | $attr | ) |

Returns
  true if the attribute $attribute exists.

Definition at line 65 of file ezcollaborationitemhandler.php.

References attributes().

## ◆ hasContentAttribute()

eZCollaborationItemHandler::hasContentAttribute | ( |  | $collaborationItem,
|  |  | $attribute
| ) |  |

Returns
  true if the attribute $attribute exists in the content data.

Definition at line 256 of file ezcollaborationitemhandler.php.

## ◆ hasCustomInput()

eZCollaborationItemHandler::hasCustomInput | ( |  | $name | ) |

Returns
  true if the custom input variable $name exists.

Definition at line 431 of file ezcollaborationitemhandler.php.

References eZHTTPTool\instance().

## ◆ ini()

static eZCollaborationItemHandler::ini | ( |  | ) |
| static

Returns
  the ini object which handles collaboration settings.

Definition at line 367 of file ezcollaborationitemhandler.php.

Referenced by activeHandlers(), defaultRepositories(), and extensionRepositories().

## ◆ instantiate()

static eZCollaborationItemHandler::instantiate | ( |  | $handler,
|  |  | $repositories = `false`
| ) |  |
| static

Returns
  a unique instance of the handler for the identifier $handler. If $repositories is left out it will use the handlerRepositories.

Definition at line 504 of file ezcollaborationitemhandler.php.

References handlerRepositories(), eZDir\path(), and eZDebug\writeWarning().

Referenced by fetchList(), and eZCollaborationItem\handler().

## ◆ isCustomAction()

eZCollaborationItemHandler::isCustomAction | ( |  | $name | ) |

Returns
  true if the current custom action is $name.

Definition at line 421 of file ezcollaborationitemhandler.php.

References eZHTTPTool\instance().

Referenced by eZApproveCollaborationHandler\handleCustomAction().

## ◆ messageCount()

eZCollaborationItemHandler::messageCount | ( |  | $collaborationItem | ) |

Returns
  the number of messages for the collaboration item $collaborationItem.

Note
  The default implementation returns 0, if you want real counts the handler must reimplement this function.

Reimplemented in eZApproveCollaborationHandler.

Definition at line 330 of file ezcollaborationitemhandler.php.

## ◆ notificationCollectionHandling()

eZCollaborationItemHandler::notificationCollectionHandling | ( |  | ) |

Returns
  how the handler wants collections to be made.

Note
  The default is to create one collection for all participants.

Definition at line 103 of file ezcollaborationitemhandler.php.

References $NotificationCollectionHandling.

## ◆ notificationParticipantTemplate()

eZCollaborationItemHandler::notificationParticipantTemplate | ( |  | $participantRole | ) |

Reimplemented in eZApproveCollaborationHandler.

Definition at line 108 of file ezcollaborationitemhandler.php.

Referenced by handleCollaborationEvent().

## ◆ notificationTypes()

eZCollaborationItemHandler::notificationTypes | ( |  | ) |

Returns
  what kind of notification types this handler supports. Can either return an array or a boolean. If it returns `true` the handler supports notification but does not have subnotifications. If it returns `false` the handler does not support notificiation. If it returns an array the array contains a list associative arrays each containing a `name` and `value` entry.

Definition at line 94 of file ezcollaborationitemhandler.php.

References $NotificationTypes.

Referenced by attribute().

## ◆ participantRoleString()

eZCollaborationItemHandler::participantRoleString | ( |  | $participantRole | ) |

Returns
  a textual representation of the participant role id $participantRole

Note
  It's up to the real handlers to implement this if they use custom participation roles.

Definition at line 385 of file ezcollaborationitemhandler.php.

## ◆ participantTypeString()

eZCollaborationItemHandler::participantTypeString | ( |  | $participantType | ) |

Returns
  a textual representation of the participant type id $participantType

Note
  It's up to the real handlers to implement this if they use custom participation types.

Definition at line 376 of file ezcollaborationitemhandler.php.

## ◆ readItem()

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

This is called whenever the item is considered to be read, it can be used by handlers to update when the item was last read.

Note
  Default implementation does nothing.

Reimplemented in eZApproveCollaborationHandler.

Definition at line 350 of file ezcollaborationitemhandler.php.

## ◆ removeItem()

eZCollaborationItemHandler::removeItem | ( |  | $collaborationItem | ) |

This is called whenever a collaboration item is to be removed. Reimplementing this function can be used to cleanup external tables or other resources.

Definition at line 359 of file ezcollaborationitemhandler.php.

## ◆ roleName()

eZCollaborationItemHandler::roleName | ( |  | $collaborationID,
|  |  | $roleID
| ) |  |

Returns
  a description of the role id $roleID in the current language.

Note
  It's up to the real handlers to implement this if they use custom participation roles.

Definition at line 394 of file ezcollaborationitemhandler.php.

## ◆ template()

eZCollaborationItemHandler::template | ( |  | $viewMode | ) |

Returns
  the template name for the viewmode $viewmode.

Definition at line 292 of file ezcollaborationitemhandler.php.

References templateName().

## ◆ templateName()

eZCollaborationItemHandler::templateName | ( |  | ) |

Returns
  the name of the template file for this handler. Default is to append .tpl to the identifier.

Definition at line 302 of file ezcollaborationitemhandler.php.

Referenced by template().

## ◆ title()

eZCollaborationItemHandler::title | ( |  | $collaborationItem | ) |

Returns
  the title of the collaboration item.

Reimplemented in eZApproveCollaborationHandler.

Definition at line 310 of file ezcollaborationitemhandler.php.

## ◆ unreadMessageCount()

eZCollaborationItemHandler::unreadMessageCount | ( |  | $collaborationItem | ) |

Returns
  the number of unread messages for the collaboration item $collaborationItem.

Note
  The default implementation returns 0, if you want real counts the handler must reimplement this function.

Reimplemented in eZApproveCollaborationHandler.

Definition at line 340 of file ezcollaborationitemhandler.php.

## ◆ useMessages()

eZCollaborationItemHandler::useMessages | ( |  | $collaborationItem | ) |

Returns
  true if the collaboration item $collaborationItem supports messages.

Note
  The handler can either determine this by passing $useMessages to the constructor or by reimplementing this function to do it per item.

Definition at line 320 of file ezcollaborationitemhandler.php.

## Member Data Documentation

## ◆ $Info

eZCollaborationItemHandler::$Info

Definition at line 573 of file ezcollaborationitemhandler.php.

Referenced by attribute().

## ◆ $NotificationCollectionHandling

eZCollaborationItemHandler::$NotificationCollectionHandling

Definition at line 19 of file ezcollaborationitemhandler.php.

Referenced by notificationCollectionHandling().

## ◆ $NotificationTypes

eZCollaborationItemHandler::$NotificationTypes

Definition at line 20 of file ezcollaborationitemhandler.php.

Referenced by notificationTypes().

## ◆ NOTIFICATION_COLLECTION_ONE_FOR_ALL

const eZCollaborationItemHandler::NOTIFICATION_COLLECTION_ONE_FOR_ALL = 1

Definition at line 24 of file ezcollaborationitemhandler.php.

## ◆ NOTIFICATION_COLLECTION_PER_PARTICIPATION_ROLE

const eZCollaborationItemHandler::NOTIFICATION_COLLECTION_PER_PARTICIPATION_ROLE = 3

Definition at line 26 of file ezcollaborationitemhandler.php.

Referenced by eZApproveCollaborationHandler\__construct().

## ◆ NOTIFICATION_COLLECTION_PER_USER

const eZCollaborationItemHandler::NOTIFICATION_COLLECTION_PER_USER = 2

Definition at line 25 of file ezcollaborationitemhandler.php.

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

- ezcollaborationitemhandler.php

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