Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcollaborationsimplemessage.php
Go to the documentation of this file.
1 <?php
17 class eZCollaborationSimpleMessage extends eZPersistentObject
18 {
19 static function definition()
20 {
21 return array( 'fields' => array( 'id' => array( 'name' => 'ID',
22 'datatype' => 'integer',
23 'default' => 0,
24 'required' => true ),
25 'message_type' => array( 'name' => 'MessageType',
26 'datatype' => 'string',
27 'default' => '',
28 'required' => true ),
29 'data_text1' => array( 'name' => 'DataText1',
30 'datatype' => 'text',
31 'default' => '',
32 'required' => true ),
33 'data_text2' => array( 'name' => 'DataText2',
34 'datatype' => 'text',
35 'default' => '',
36 'required' => true ),
37 'data_text3' => array( 'name' => 'DataText3',
38 'datatype' => 'text',
39 'default' => '',
40 'required' => true ),
41 'data_int1' => array( 'name' => 'DataInt1',
42 'datatype' => 'integer',
43 'default' => 0,
44 'required' => true ),
45 'data_int2' => array( 'name' => 'DataInt2',
46 'datatype' => 'integer',
47 'default' => 0,
48 'required' => true ),
49 'data_int3' => array( 'name' => 'DataInt3',
50 'datatype' => 'integer',
51 'default' => 0,
52 'required' => true ),
53 'data_float1' => array( 'name' => 'DataFloat1',
54 'datatype' => 'float',
55 'default' => 0,
56 'required' => true ),
57 'data_float2' => array( 'name' => 'DataFloat2',
58 'datatype' => 'float',
59 'default' => 0,
60 'required' => true ),
61 'data_float3' => array( 'name' => 'DataFloat3',
62 'datatype' => 'float',
63 'default' => 0,
64 'required' => true ),
65 'creator_id' => array( 'name' => 'CreatorID',
66 'datatype' => 'integer',
67 'default' => 0,
68 'required' => true,
69 'foreign_class' => 'eZUser',
70 'foreign_attribute' => 'contentobject_id',
71 'multiplicity' => '1..*' ),
72 'created' => array( 'name' => 'Created',
73 'datatype' => 'integer',
74 'default' => 0,
75 'required' => true ),
76 'modified' => array( 'name' => 'Modified',
77 'datatype' => 'integer',
78 'default' => 0,
79 'required' => true ) ),
80 'keys' => array( 'id' ),
81 'function_attributes' => array( 'participant' => 'participant' ),
82 'increment_key' => 'id',
83 'class_name' => 'eZCollaborationSimpleMessage',
84 'name' => 'ezcollab_simple_message' );
85 }
86
87 static function create( $type, $text = false, $creatorID = false )
88 {
89 $date_time = time();
90 if ( $creatorID === false )
91 {
92 $user = eZUser::currentUser();
93 $creatorID = $user->attribute( 'contentobject_id' );
94 }
95 return new eZCollaborationSimpleMessage( array( 'message_type' => $type,
96 'data_text1' => $text,
97 'creator_id' => $creatorID,
98 'created' => $date_time,
99 'modified' => $date_time ) );
100 }
101
102 static function fetch( $id, $asObject = true )
103 {
104 return eZPersistentObject::fetchObject( eZCollaborationSimpleMessage::definition(),
105 null,
106 array( "id" => $id ),
107 $asObject );
108 }
109
110 function participant()
111 {
112 // TODO: Get participant trough participant link from item
113 return null;
114 }
115
117 public $ID;
118 public $ParticipantID;
119 public $Created;
120 public $Modified;
121 public $DataText1;
122 public $DataText2;
123 public $DataText3;
124 public $DataInt1;
125 public $DataInt2;
126 public $DataInt3;
127 public $DataFloat1;
128 public $DataFloat2;
129 public $DataFloat3;
130 }
131
132 ?>
eZCollaborationSimpleMessage
The class eZCollaborationSimpleMessage does.
Definition: ezcollaborationsimplemessage.php:18
eZCollaborationSimpleMessage\$ID
$ID
Definition: ezcollaborationsimplemessage.php:117
eZCollaborationSimpleMessage\$DataFloat1
$DataFloat1
Definition: ezcollaborationsimplemessage.php:127
eZCollaborationSimpleMessage\$DataText3
$DataText3
Definition: ezcollaborationsimplemessage.php:123
eZCollaborationSimpleMessage\$DataFloat3
$DataFloat3
Definition: ezcollaborationsimplemessage.php:129
eZCollaborationSimpleMessage\$DataText2
$DataText2
Definition: ezcollaborationsimplemessage.php:122
eZCollaborationSimpleMessage\$DataFloat2
$DataFloat2
Definition: ezcollaborationsimplemessage.php:128
eZCollaborationSimpleMessage\$Created
$Created
Definition: ezcollaborationsimplemessage.php:119
eZCollaborationSimpleMessage\participant
participant()
Definition: ezcollaborationsimplemessage.php:110
eZCollaborationSimpleMessage\$DataInt1
$DataInt1
Definition: ezcollaborationsimplemessage.php:124
eZCollaborationSimpleMessage\create
static create( $type, $text=false, $creatorID=false)
Definition: ezcollaborationsimplemessage.php:87
eZCollaborationSimpleMessage\fetch
static fetch( $id, $asObject=true)
Definition: ezcollaborationsimplemessage.php:102
eZCollaborationSimpleMessage\$DataText1
$DataText1
Definition: ezcollaborationsimplemessage.php:121
eZCollaborationSimpleMessage\$DataInt3
$DataInt3
Definition: ezcollaborationsimplemessage.php:126
eZCollaborationSimpleMessage\$Modified
$Modified
Definition: ezcollaborationsimplemessage.php:120
eZCollaborationSimpleMessage\definition
static definition()
Definition: ezcollaborationsimplemessage.php:19
eZCollaborationSimpleMessage\$DataInt2
$DataInt2
Definition: ezcollaborationsimplemessage.php:125
eZCollaborationSimpleMessage\$ParticipantID
$ParticipantID
Definition: ezcollaborationsimplemessage.php:118
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\fetchObject
static fetchObject( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
Definition: ezpersistentobject.php:213
eZUser\currentUser
static currentUser()
Definition: ezuser.php:1716
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.