Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezenumvalue.php
Go to the documentation of this file.
1 <?php
18 class eZEnumValue extends eZPersistentObject
19 {
20 static function definition()
21 {
22 return array( "fields" => array( "id" => array( 'name' => 'ID',
23 'datatype' => 'integer',
24 'default' => 0,
25 'required' => true ),
26 "contentclass_attribute_id" => array( 'name' => "ContentClassAttributeID",
27 'datatype' => 'integer',
28 'default' => 0,
29 'required' => true,
30 'foreign_class' => 'eZContentClassAttribute',
31 'foreign_attribute' => 'id',
32 'multiplicity' => '1..*' ),
33 "contentclass_attribute_version" => array( 'name' => "ContentClassAttributeVersion",
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 "placement" => array( 'name' => "Placement",
46 'datatype' => 'integer',
47 'default' => 0,
48 'required' => true ) ),
49 "keys" => array( "id", "contentclass_attribute_id", "contentclass_attribute_version" ),
50 "increment_key" => "id",
51 "sort" => array( "id" => "asc" ),
52 "class_name" => "eZEnumValue",
53 "name" => "ezenumvalue" );
54 }
55
56 function __clone()
57 {
58 unset( $this->ID );
59 }
60
61 static function create( $contentClassAttributeID, $contentClassAttributeVersion, $element )
62 {
63 $row = array( "id" => null,
64 "contentclass_attribute_id" => $contentClassAttributeID,
65 "contentclass_attribute_version" => $contentClassAttributeVersion,
66 "enumvalue" => "",
67 "enumelement" => $element,
68 "placement" => eZPersistentObject::newObjectOrder( eZEnumValue::definition(),
69 "placement",
70 array( "contentclass_attribute_id" => $contentClassAttributeID,
71 "contentclass_attribute_version" => $contentClassAttributeVersion ) ) );
72 return new eZEnumValue( $row );
73 }
74
75 static function createCopy( $id, $contentClassAttributeID, $contentClassAttributeVersion, $element, $value, $placement )
76 {
77 $row = array( "id" => $id,
78 "contentclass_attribute_id" => $contentClassAttributeID,
79 "contentclass_attribute_version" => $contentClassAttributeVersion,
80 "enumvalue" => $value,
81 "enumelement" => $element,
82 "placement" => $placement );
83 return new eZEnumValue( $row );
84 }
85
86 static function removeAllElements( $contentClassAttributeID, $version )
87 {
88 eZPersistentObject::removeObject( eZEnumValue::definition(),
89 array( "contentclass_attribute_id" => $contentClassAttributeID,
90 "contentclass_attribute_version" => $version) );
91 }
92
93 static function removeByID( $id , $version )
94 {
95 eZPersistentObject::removeObject( eZEnumValue::definition(),
96 array( "id" => $id,
97 "contentclass_attribute_version" => $version) );
98 }
99
100 static function fetch( $id, $version, $asObject = true )
101 {
102 return eZPersistentObject::fetchObject( eZEnumValue::definition(),
103 null,
104 array( "id" => $id,
105 "contentclass_attribute_version" => $version),
106 $asObject );
107 }
108
109 static function fetchAllElements( $classAttributeID, $version, $asObject = true )
110 {
111 if ( $classAttributeID === null )
112 {
113 return array();
114 }
115
116 return eZPersistentObject::fetchObjectList( eZEnumValue::definition(),
117 null,
118 array( "contentclass_attribute_id" => $classAttributeID,
119 "contentclass_attribute_version" => $version ),
120 null,
121 null,
122 $asObject );
123 }
124
125 public $ID;
126 public $ContentClassAttributeID;
127 public $ContentClassAttributeVersion;
128 public $EnumElement;
129 public $EnumValue;
130 public $Placement;
131 }
132
133 ?>
eZEnumValue
The class eZEnumValue does.
Definition: ezenumvalue.php:19
eZEnumValue\removeByID
static removeByID( $id, $version)
Definition: ezenumvalue.php:93
eZEnumValue\removeAllElements
static removeAllElements( $contentClassAttributeID, $version)
Definition: ezenumvalue.php:86
eZEnumValue\fetchAllElements
static fetchAllElements( $classAttributeID, $version, $asObject=true)
Definition: ezenumvalue.php:109
eZEnumValue\$ContentClassAttributeID
$ContentClassAttributeID
Definition: ezenumvalue.php:126
eZEnumValue\fetch
static fetch( $id, $version, $asObject=true)
Definition: ezenumvalue.php:100
eZEnumValue\$Placement
$Placement
Definition: ezenumvalue.php:130
eZEnumValue\definition
static definition()
Definition: ezenumvalue.php:20
eZEnumValue\$EnumElement
$EnumElement
Definition: ezenumvalue.php:128
eZEnumValue\$EnumValue
$EnumValue
Definition: ezenumvalue.php:129
eZEnumValue\createCopy
static createCopy( $id, $contentClassAttributeID, $contentClassAttributeVersion, $element, $value, $placement)
Definition: ezenumvalue.php:75
eZEnumValue\__clone
__clone()
Definition: ezenumvalue.php:56
eZEnumValue\create
static create( $contentClassAttributeID, $contentClassAttributeVersion, $element)
Definition: ezenumvalue.php:61
eZEnumValue\$ContentClassAttributeVersion
$ContentClassAttributeVersion
Definition: ezenumvalue.php:127
eZEnumValue\$ID
$ID
Definition: ezenumvalue.php:125
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\newObjectOrder
static newObjectOrder( $def, $orderField, $conditions)
Definition: ezpersistentobject.php:1034
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+.