Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezenumobjectvalue.php
Go to the documentation of this file.
1 <?php
17 class eZEnumObjectValue extends eZPersistentObject
18 {
19 static function definition()
20 {
21 return array( "fields" => array( "contentobject_attribute_id" => array( 'name' => "ContentObjectAttributeID",
22 'datatype' => 'integer',
23 'default' => 0,
24 'required' => true,
25 'foreign_class' => 'eZContentObjectAttribute',
26 'foreign_attribute' => 'id',
27 'multiplicity' => '1..*' ),
28 "contentobject_attribute_version" => array( 'name' => "ContentObjectAttributeVersion",
29 'datatype' => 'integer',
30 'default' => 0,
31 'required' => true,
32 'short_name' => 'contentobject_attr_version' ),
33 "enumid" => array( 'name' => "EnumID",
34 'datatype' => 'integer',
35 'default' => 0,
36 'required' => true ),
37 "enumelement" => array( 'name' => "EnumElement",
38 'datatype' => 'string',
39 'default' => '',
40 'required' => true ),
41 "enumvalue" => array( 'name' => "EnumValue",
42 'datatype' => 'string',
43 'default' => '',
44 'required' => true ) ),
45 "keys" => array( "contentobject_attribute_id", "contentobject_attribute_version", "enumid" ),
46 "sort" => array( "contentobject_attribute_id" => "asc" ),
47 "class_name" => "eZEnumObjectValue",
48 "name" => "ezenumobjectvalue" );
49 }
50
51 static function create( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumID, $enumElement, $enumValue )
52 {
53 $row = array( "contentobject_attribute_id" => $contentObjectAttributeID,
54 "contentobject_attribute_version" => $contentObjectAttributeVersion,
55 "enumid" => $enumID,
56 "enumelement" => $enumElement,
57 "enumvalue" => $enumValue );
58 return new eZEnumObjectValue( $row );
59 }
60
61 static function removeAllElements( $contentObjectAttributeID, $contentObjectAttributeVersion )
62 {
63 if( $contentObjectAttributeVersion == null )
64 {
65 eZPersistentObject::removeObject( eZEnumObjectValue::definition(),
66 array( "contentobject_attribute_id" => $contentObjectAttributeID ) );
67 }
68 else
69 {
70 eZPersistentObject::removeObject( eZEnumObjectValue::definition(),
71 array( "contentobject_attribute_id" => $contentObjectAttributeID,
72 "contentobject_attribute_version" => $contentObjectAttributeVersion ) );
73 }
74 }
75
76 function removeByOAID( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumid )
77 {
78 eZPersistentObject::removeObject( eZEnumObjectValue::definition(),
79 array( "enumid" => $enumid,
80 "contentobject_attribute_id" => $contentObjectAttributeID,
81 "contentobject_attribute_version" => $contentObjectAttributeVersion ) );
82 }
83
84 static function fetch( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumid, $asObject = true )
85 {
86 return eZPersistentObject::fetchObject( eZEnumObjectValue::definition(),
87 null,
88 array( "contentobject_attribute_id" => $contentObjectAttributeID,
89 "contentobject_attribute_version" => $contentObjectAttributeVersion,
90 "enumid" => $enumid ),
91 $asObject );
92 }
93
94 static function fetchAllElements( $contentObjectAttributeID, $contentObjectAttributeVersion, $asObject = true )
95 {
96 return eZPersistentObject::fetchObjectList( eZEnumObjectValue::definition(),
97 null,
98 array( "contentobject_attribute_id" => $contentObjectAttributeID,
99 "contentobject_attribute_version" => $contentObjectAttributeVersion ),
100 null,
101 null,
102 $asObject );
103 }
104
105 public $ContentObjectAttributeID;
106 public $ContentObjectAttributeVersion;
107 public $EnumID;
108 public $EnumElement;
109 public $EnumValue;
110 }
111
112 ?>
eZEnumObjectValue
The class eZEnumObjectValue stores chosen enum values of an object attribute.
Definition: ezenumobjectvalue.php:18
eZEnumObjectValue\fetchAllElements
static fetchAllElements( $contentObjectAttributeID, $contentObjectAttributeVersion, $asObject=true)
Definition: ezenumobjectvalue.php:94
eZEnumObjectValue\removeAllElements
static removeAllElements( $contentObjectAttributeID, $contentObjectAttributeVersion)
Definition: ezenumobjectvalue.php:61
eZEnumObjectValue\$ContentObjectAttributeVersion
$ContentObjectAttributeVersion
Definition: ezenumobjectvalue.php:106
eZEnumObjectValue\fetch
static fetch( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumid, $asObject=true)
Definition: ezenumobjectvalue.php:84
eZEnumObjectValue\removeByOAID
removeByOAID( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumid)
Definition: ezenumobjectvalue.php:76
eZEnumObjectValue\$EnumID
$EnumID
Definition: ezenumobjectvalue.php:107
eZEnumObjectValue\$ContentObjectAttributeID
$ContentObjectAttributeID
Definition: ezenumobjectvalue.php:105
eZEnumObjectValue\definition
static definition()
Definition: ezenumobjectvalue.php:19
eZEnumObjectValue\create
static create( $contentObjectAttributeID, $contentObjectAttributeVersion, $enumID, $enumElement, $enumValue)
Definition: ezenumobjectvalue.php:51
eZEnumObjectValue\$EnumValue
$EnumValue
Definition: ezenumobjectvalue.php:109
eZEnumObjectValue\$EnumElement
$EnumElement
Definition: ezenumobjectvalue.php:108
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\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
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.