[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZWaitUntilDateValue class 4 // 5 // Created on: <14-ñÎ×-2003 14:49:06 sp> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezwaituntildatevalue.php 30 */ 31 32 /*! 33 \class eZWaitUntilDateValue ezwaituntildatevalue.php 34 \brief The class eZWaitUntilDateValue does 35 36 */ 37 38 include_once ( "kernel/classes/ezpersistentobject.php" ); 39 40 class eZWaitUntilDateValue extends eZPersistentObject 41 { 42 /*! 43 Constructor 44 */ 45 function eZWaitUntilDateValue( $row ) 46 { 47 $this->eZPersistentObject( $row ); 48 $this->ClassName = null; 49 $this->ClassAttributeName = null; 50 51 } 52 53 function definition() 54 { 55 return array( "fields" => array( "id" => array( 'name' => 'ID', 56 'datatype' => 'integer', 57 'default' => 0, 58 'required' => true ), 59 "workflow_event_id" => array( 'name' => "WorkflowEventID", 60 'datatype' => 'integer', 61 'default' => 0, 62 'required' => true, 63 'foreign_class' => 'eZWorkflowEvent', 64 'foreign_attribute' => 'id', 65 'multiplicity' => '1..*' ), 66 "workflow_event_version" => array( 'name' => "WorkflowEventVersion", 67 'datatype' => 'integer', 68 'default' => 0, 69 'required' => true ), 70 "contentclass_id" => array( 'name' => "ContentClassID", 71 'datatype' => 'integer', 72 'default' => 0, 73 'required' => true, 74 'foreign_class' => 'eZContentClass', 75 'foreign_attribute' => 'id', 76 'multiplicity' => '1..*' ), 77 "contentclass_attribute_id" => array( 'name' => "ContentClassAttributeID", 78 'datatype' => 'integer', 79 'default' => 0, 80 'required' => true, 81 'foreign_class' => 'eZContentClassAttribute', 82 'foreign_attribute' => 'id', 83 'multiplicity' => '1..*' ) ), 84 "keys" => array( "id", "workflow_event_id", "workflow_event_version" ), 85 "function_attributes" => array( "class_name" => "className", 86 "classattribute_name" => "classAttributeName" ), 87 "increment_key" => "id", 88 "sort" => array( "id" => "asc" ), 89 "class_name" => "eZWaitUntilDateValue", 90 "name" => "ezwaituntildatevalue" ); 91 } 92 93 function &className() 94 { 95 if ( $this->ClassName === null ) 96 { 97 $contentClass = eZContentClass::fetch( $this->attribute( 'contentclass_id' ) ); 98 $this->ClassName =& $contentClass->attribute( 'name' ); 99 } 100 return $this->ClassName; 101 } 102 103 function &classAttributeName() 104 { 105 if ( $this->ClassAttributeName === null ) 106 { 107 $contentClassAttribute =& eZContentClassAttribute::fetch( $this->attribute( 'contentclass_attribute_id' ) ); 108 $this->ClassAttributeName =& $contentClassAttribute->attribute( 'name' ); 109 } 110 return $this->ClassAttributeName; 111 } 112 113 function &clone() 114 { 115 $row = array( "id" => null, 116 "workflow_event_id" => $this->attribute( 'workflow_event_id' ), 117 "workflow_event_version" => $this->attribute( 'workflow_event_version' ), 118 "contentclass_id" => $this->attribute( "contentclass_id" ), 119 "contentclass_attribute_id" => $this->attribute( 'contentclass_attribute_id' ) ); 120 $newWaitUntilDateValue = new eZWaitUntilDateValue( $row ); 121 return $newWaitUntilDateValue; 122 } 123 124 function create( $workflowEventID, $workflowEventVersion, $contentClassAttributeID, $contentClassID ) 125 { 126 $row = array( "id" => null, 127 "workflow_event_id" => $workflowEventID, 128 "workflow_event_version" => $workflowEventVersion, 129 "contentclass_id" => $contentClassID, 130 "contentclass_attribute_id" => $contentClassAttributeID 131 ); 132 return new eZWaitUntilDateValue( $row ); 133 } 134 135 function createCopy( $id, $workflowEventID, $workflowEventVersion, $contentClassID , $contentClassAttributeID ) 136 { 137 $row = array( "id" => $id, 138 "workflow_event_id" => $workflowEventID, 139 "workflow_event_version" => $workflowEventVersion, 140 "contentclass_id" => $contentClassID, 141 "contentclass_attribute_id" => $contentClassAttributeID ); 142 return new eZWaitUntilDateValue( $row ); 143 } 144 145 146 function removeAllElements( $workflowEventID, $version ) 147 { 148 eZPersistentObject::removeObject( eZWaitUntilDateValue::definition(), 149 array( "workflow_event_id" => $workflowEventID, 150 "workflow_event_version" => $version) ); 151 } 152 153 function remove( $id , $version ) 154 { 155 eZPersistentObject::removeObject( eZWaitUntilDateValue::definition(), 156 array( "id" => $id, 157 "workflow_event_version" => $version) ); 158 } 159 160 function &fetch( $id, $version, $asObject = true ) 161 { 162 $object = eZPersistentObject::fetchObject( eZWaitUntilDateValue::definition(), 163 null, 164 array( "id" => $id, 165 "workflow_event_version" => $version), 166 $asObject ); 167 return $object; 168 } 169 170 function &fetchAllElements( $workflowEventID, $version, $asObject = true ) 171 { 172 $objectList = eZPersistentObject::fetchObjectList( eZWaitUntilDateValue::definition(), 173 null, 174 array( "workflow_event_id" => $workflowEventID, 175 "workflow_event_version" => $version ), 176 null, 177 null, 178 $asObject ); 179 return $objectList; 180 } 181 182 var $ClassName; 183 var $ClassAttributeName; 184 } 185 186 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |