eZ Publish  [trunk]
eZCollaborationItemHandler Class Reference

The class eZCollaborationItemHandler does. More...

+ Inheritance diagram for eZCollaborationItemHandler:

List of all members.

Public Member Functions

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

Static Public Member Functions

static activeHandlers ()
static defaultRepositories ()
static extensionRepositories ()
static fetchList ()
static handleCollaborationEvent ($event, $item, &$parameters)
static handlerRepositories ()
static ini ()
static instantiate ($handler, $repositories=false)

Public Attributes

 $Info
const NOTIFICATION_COLLECTION_ONE_FOR_ALL = 1
const NOTIFICATION_COLLECTION_PER_PARTICIPATION_ROLE = 3
const NOTIFICATION_COLLECTION_PER_USER = 2

Detailed Description

The class eZCollaborationItemHandler does.

Definition at line 17 of file ezcollaborationitemhandler.php.


Member Function Documentation

Returns:
an array with handler identifiers that are considered active.

Definition at line 485 of file ezcollaborationitemhandler.php.

Referenced by fetchList().

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

Definition at line 65 of file ezcollaborationitemhandler.php.

Returns:
a list of classes this handler supports.

Definition at line 276 of file ezcollaborationitemhandler.php.

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 395 of file ezcollaborationitemhandler.php.

eZCollaborationItemHandler::contentAttribute ( collaborationItem,
attribute 
)
Returns:
the attribute $attribute if it exists in the content data or null.

Definition at line 261 of file ezcollaborationitemhandler.php.

Returns:
value of the custom input variable $name.

Definition at line 433 of file ezcollaborationitemhandler.php.

Referenced by eZApproveCollaborationHandler\handleCustomAction().

Returns:
an array with directories which acts as default collaboration repositories.
See also:
handlerRepositories

Definition at line 445 of file ezcollaborationitemhandler.php.

Referenced by handlerRepositories().

Returns:
an array with directories which acts as collaboration extension repositories.
See also:
handlerRepositories

Definition at line 456 of file ezcollaborationitemhandler.php.

Referenced by handlerRepositories().

eZCollaborationItemHandler::eZCollaborationItemHandler ( typeIdentifier,
typeName,
parameters = array() 
)

Initializes the handler with identifier and name. Optional parameters can be placed in $parameters.

Definition at line 30 of file ezcollaborationitemhandler.php.

Referenced by eZApproveCollaborationHandler\eZApproveCollaborationHandler().

Returns:
a list of collaboration handler objects.
See also:
instantiate, activeHandlers

Definition at line 547 of file ezcollaborationitemhandler.php.

Referenced by eZCollaborationNotificationHandler\collaborationHandlers().

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 112 of file ezcollaborationitemhandler.php.

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 406 of file ezcollaborationitemhandler.php.

Returns:
an array with directories which acts as collaboration repositories.
See also:
defaultRepositories, extensionRepositories

Definition at line 467 of file ezcollaborationitemhandler.php.

Referenced by fetchList(), and instantiate().

Returns:
true if the attribute $attribute exists.

Definition at line 57 of file ezcollaborationitemhandler.php.

eZCollaborationItemHandler::hasContentAttribute ( collaborationItem,
attribute 
)
Returns:
true if the attribute $attribute exists in the content data.

Definition at line 248 of file ezcollaborationitemhandler.php.

Returns:
true if the custom input variable $name exists.

Definition at line 423 of file ezcollaborationitemhandler.php.

static eZCollaborationItemHandler::ini ( ) [static]
Returns:
the ini object which handles collaboration settings.

Definition at line 359 of file ezcollaborationitemhandler.php.

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

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 496 of file ezcollaborationitemhandler.php.

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

Returns:
true if the current custom action is $name.

Definition at line 413 of file ezcollaborationitemhandler.php.

Referenced by eZApproveCollaborationHandler\handleCustomAction().

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 322 of file ezcollaborationitemhandler.php.

Returns:
how the handler wants collections to be made.
Note:
The default is to create one collection for all participants.

Definition at line 95 of file ezcollaborationitemhandler.php.

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 86 of file ezcollaborationitemhandler.php.

Referenced by attribute().

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 377 of file ezcollaborationitemhandler.php.

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 368 of file ezcollaborationitemhandler.php.

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 342 of file ezcollaborationitemhandler.php.

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 351 of file ezcollaborationitemhandler.php.

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 386 of file ezcollaborationitemhandler.php.

Returns:
the template name for the viewmode $viewmode.

Definition at line 284 of file ezcollaborationitemhandler.php.

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

Definition at line 294 of file ezcollaborationitemhandler.php.

Referenced by template().

eZCollaborationItemHandler::title ( collaborationItem)
Returns:
the title of the collaboration item.

Reimplemented in eZApproveCollaborationHandler.

Definition at line 302 of file ezcollaborationitemhandler.php.

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 332 of file ezcollaborationitemhandler.php.

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 312 of file ezcollaborationitemhandler.php.


Member Data Documentation

eZCollaborationItemHandler::$Info

Definition at line 565 of file ezcollaborationitemhandler.php.


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