Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcollaborationtype.php
Go to the documentation of this file.
1 <?php
17 class eZCollaborationEventType extends eZNotificationEventType
18 {
19 const NOTIFICATION_TYPE_STRING = 'ezcollaboration';
20
21 public function __construct()
22 {
23 parent::__construct( self::NOTIFICATION_TYPE_STRING );
24 }
25
26 function initializeEvent( $event, $params )
27 {
28 eZDebugSetting::writeDebug( 'kernel-notification', $params, 'params for type collaboration' );
29 $event->setAttribute( 'data_int1', $params['collaboration_id'] );
30 $event->setAttribute( 'data_text1', $params['collaboration_identifier'] );
31 }
32
33 function attributes()
34 {
35 return array_merge( array( 'collaboration_identifier',
36 'collaboration_id' ),
37 eZNotificationEventType::attributes() );
38 }
39
40 function hasAttribute( $attributeName )
41 {
42 return in_array( $attributeName, $this->attributes() );
43 }
44
45 function attribute( $attributeName )
46 {
47 if ( $attributeName == 'collaboration_identifier' )
48 {
49 return eZNotificationEventType::attribute( 'data_text1' );
50 }
51 else if ( $attributeName == 'collaboration_id' )
52 {
53 return eZNotificationEventType::attribute( 'data_int1' );
54 }
55
56 return eZNotificationEventType::attribute( $attributeName );
57 }
58
59 function eventContent( $event )
60 {
61 return eZCollaborationItem::fetch( $event->attribute( 'data_int1' ) );
62 }
63 }
64
65 eZNotificationEventType::register( eZCollaborationEventType::NOTIFICATION_TYPE_STRING, 'eZCollaborationEventType' );
66
67 ?>
eZCollaborationEventType
The class eZCollaborationEventType does.
Definition: ezcollaborationtype.php:18
eZCollaborationEventType\attribute
attribute( $attributeName)
Definition: ezcollaborationtype.php:45
eZCollaborationEventType\hasAttribute
hasAttribute( $attributeName)
Definition: ezcollaborationtype.php:40
eZCollaborationEventType\__construct
__construct()
Definition: ezcollaborationtype.php:21
eZCollaborationEventType\initializeEvent
initializeEvent( $event, $params)
Definition: ezcollaborationtype.php:26
eZCollaborationEventType\NOTIFICATION_TYPE_STRING
const NOTIFICATION_TYPE_STRING
Definition: ezcollaborationtype.php:19
eZCollaborationEventType\attributes
attributes()
Definition: ezcollaborationtype.php:33
eZCollaborationEventType\eventContent
eventContent( $event)
Definition: ezcollaborationtype.php:59
eZCollaborationItem\fetch
static fetch( $id, $creatorID=false, $asObject=true)
Definition: ezcollaborationitem.php:135
eZDebugSetting\writeDebug
static writeDebug( $conditionName, $string, $label="")
Definition: ezdebugsetting.php:127
eZNotificationEventType
The class eZNotificationEventType does.
Definition: eznotificationeventtype.php:18
eZNotificationEventType\attribute
attribute( $attr)
Definition: eznotificationeventtype.php:78
eZNotificationEventType\attributes
attributes()
Definition: eznotificationeventtype.php:67
eZNotificationEventType\register
static register( $notificationTypeString, $className)
Definition: eznotificationeventtype.php:166
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.