Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezwaituntildatevalue.php
Go to the documentation of this file.
1 <?php
17 class eZWaitUntilDateValue extends eZPersistentObject
18 {
19 public function __construct( $row )
20 {
21 parent::__construct( $row );
22 $this->ClassName = null;
23 $this->ClassAttributeName = null;
24
25 }
26
27 static function definition()
28 {
29 return array( "fields" => array( "id" => array( 'name' => 'ID',
30 'datatype' => 'integer',
31 'default' => 0,
32 'required' => true ),
33 "workflow_event_id" => array( 'name' => "WorkflowEventID",
34 'datatype' => 'integer',
35 'default' => 0,
36 'required' => true,
37 'foreign_class' => 'eZWorkflowEvent',
38 'foreign_attribute' => 'id',
39 'multiplicity' => '1..*' ),
40 "workflow_event_version" => array( 'name' => "WorkflowEventVersion",
41 'datatype' => 'integer',
42 'default' => 0,
43 'required' => true ),
44 "contentclass_id" => array( 'name' => "ContentClassID",
45 'datatype' => 'integer',
46 'default' => 0,
47 'required' => true,
48 'foreign_class' => 'eZContentClass',
49 'foreign_attribute' => 'id',
50 'multiplicity' => '1..*' ),
51 "contentclass_attribute_id" => array( 'name' => "ContentClassAttributeID",
52 'datatype' => 'integer',
53 'default' => 0,
54 'required' => true,
55 'foreign_class' => 'eZContentClassAttribute',
56 'foreign_attribute' => 'id',
57 'multiplicity' => '1..*' ) ),
58 "keys" => array( "id", "workflow_event_id", "workflow_event_version" ),
59 "function_attributes" => array( "class_name" => "className",
60 "classattribute_name" => "classAttributeName" ),
61 "increment_key" => "id",
62 "sort" => array( "id" => "asc" ),
63 "class_name" => "eZWaitUntilDateValue",
64 "name" => "ezwaituntildatevalue" );
65 }
66
67 function className()
68 {
69 if ( $this->ClassName === null )
70 {
71 $contentClass = eZContentClass::fetch( $this->attribute( 'contentclass_id' ) );
72 if ( !$contentClass instanceof eZContentClass )
73 {
74 eZDebug::writeError( 'Unable to find eZContentClass #' . $this->attribute( 'contentclass_id' ), __METHOD__ );
75 return null;
76 }
77 $this->ClassName = $contentClass->attribute( 'name' );
78 }
79 return $this->ClassName;
80 }
81
82 function classAttributeName()
83 {
84 if ( $this->ClassAttributeName === null )
85 {
86 $contentClassAttribute = eZContentClassAttribute::fetch( $this->attribute( 'contentclass_attribute_id' ) );
87 if ( !$contentClassAttribute instanceof eZContentClassAttribute )
88 {
89 eZDebug::writeError( 'Unable to find eZContentClassAttribute #' . $this->attribute( 'contentclass_attribute_id' ), __METHOD__ );
90 return null;
91 }
92 $this->ClassAttributeName = $contentClassAttribute->attribute( 'name' );
93 }
94 return $this->ClassAttributeName;
95 }
96
97 function __clone()
98 {
99 unset( $this->ClassName );
100 unset( $this->ClassAttributeName );
101 }
102
103 static function create( $workflowEventID, $workflowEventVersion, $contentClassAttributeID, $contentClassID )
104 {
105 $row = array( "id" => null,
106 "workflow_event_id" => $workflowEventID,
107 "workflow_event_version" => $workflowEventVersion,
108 "contentclass_id" => $contentClassID,
109 "contentclass_attribute_id" => $contentClassAttributeID
110 );
111 return new eZWaitUntilDateValue( $row );
112 }
113
114 static function createCopy( $id, $workflowEventID, $workflowEventVersion, $contentClassID , $contentClassAttributeID )
115 {
116 $row = array( "id" => $id,
117 "workflow_event_id" => $workflowEventID,
118 "workflow_event_version" => $workflowEventVersion,
119 "contentclass_id" => $contentClassID,
120 "contentclass_attribute_id" => $contentClassAttributeID );
121 return new eZWaitUntilDateValue( $row );
122 }
123
124
125 static function removeAllElements( $workflowEventID, $version )
126 {
127 eZPersistentObject::removeObject( eZWaitUntilDateValue::definition(),
128 array( "workflow_event_id" => $workflowEventID,
129 "workflow_event_version" => $version) );
130 }
131
132 static function removeByID( $id , $version )
133 {
134 eZPersistentObject::removeObject( eZWaitUntilDateValue::definition(),
135 array( "id" => $id,
136 "workflow_event_version" => $version) );
137 }
138
139 function fetch( $id, $version, $asObject = true )
140 {
141 return eZPersistentObject::fetchObject( eZWaitUntilDateValue::definition(),
142 null,
143 array( "id" => $id,
144 "workflow_event_version" => $version),
145 $asObject );
146 }
147
148 static function fetchAllElements( $workflowEventID, $version, $asObject = true )
149 {
150 return eZPersistentObject::fetchObjectList( eZWaitUntilDateValue::definition(),
151 null,
152 array( "workflow_event_id" => $workflowEventID,
153 "workflow_event_version" => $version ),
154 null,
155 null,
156 $asObject );
157 }
158
159 public $ClassName;
160 public $ClassAttributeName;
161 }
162
163 ?>
eZContentClassAttribute
Encapsulates data for a class attribute.
Definition: ezcontentclassattribute.php:19
eZContentClassAttribute\fetch
static fetch( $id, $asObject=true, $version=eZContentClass::VERSION_STATUS_DEFINED, $field_filters=null)
Definition: ezcontentclassattribute.php:380
eZContentClass
Handles eZ Publish content classes.
Definition: ezcontentclass.php:20
eZContentClass\fetch
static fetch( $id, $asObject=true, $version=eZContentClass::VERSION_STATUS_DEFINED, $user_id=false, $parent_id=null)
Definition: ezcontentclass.php:1116
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\fetchObject
static fetchObject( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
Definition: ezpersistentobject.php:213
eZPersistentObject\removeObject
static removeObject( $def, $conditions=null, $extraConditions=null)
Definition: ezpersistentobject.php:271
eZPersistentObject\attribute
attribute( $attr, $noFunction=false)
Definition: ezpersistentobject.php:1329
eZPersistentObject\fetchObjectList
static fetchObjectList( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
Definition: ezpersistentobject.php:806
eZWaitUntilDateValue
The class eZWaitUntilDateValue does.
Definition: ezwaituntildatevalue.php:18
eZWaitUntilDateValue\$ClassAttributeName
$ClassAttributeName
Definition: ezwaituntildatevalue.php:160
eZWaitUntilDateValue\fetchAllElements
static fetchAllElements( $workflowEventID, $version, $asObject=true)
Definition: ezwaituntildatevalue.php:148
eZWaitUntilDateValue\__clone
__clone()
Definition: ezwaituntildatevalue.php:97
eZWaitUntilDateValue\className
className()
Definition: ezwaituntildatevalue.php:67
eZWaitUntilDateValue\removeAllElements
static removeAllElements( $workflowEventID, $version)
Definition: ezwaituntildatevalue.php:125
eZWaitUntilDateValue\classAttributeName
classAttributeName()
Definition: ezwaituntildatevalue.php:82
eZWaitUntilDateValue\definition
static definition()
Definition: ezwaituntildatevalue.php:27
eZWaitUntilDateValue\$ClassName
$ClassName
Definition: ezwaituntildatevalue.php:159
eZWaitUntilDateValue\__construct
__construct( $row)
Definition: ezwaituntildatevalue.php:19
eZWaitUntilDateValue\removeByID
static removeByID( $id, $version)
Definition: ezwaituntildatevalue.php:132
eZWaitUntilDateValue\create
static create( $workflowEventID, $workflowEventVersion, $contentClassAttributeID, $contentClassID)
Definition: ezwaituntildatevalue.php:103
eZWaitUntilDateValue\fetch
fetch( $id, $version, $asObject=true)
Definition: ezwaituntildatevalue.php:139
eZWaitUntilDateValue\createCopy
static createCopy( $id, $workflowEventID, $workflowEventVersion, $contentClassID, $contentClassAttributeID)
Definition: ezwaituntildatevalue.php:114
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.