Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezdiscountrule.php
Go to the documentation of this file.
1 <?php
17 class eZDiscountRule 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 "name" => array( 'name' => "Name",
26 'datatype' => 'string',
27 'default' => '',
28 'required' => true ) ),
29 "keys" => array( "id" ),
30 "increment_key" => "id",
31 "class_name" => "eZDiscountRule",
32 "name" => "ezdiscountrule" );
33 }
34
35 static function fetch( $id, $asObject = true )
36 {
37 return eZPersistentObject::fetchObject( eZDiscountRule::definition(),
38 null,
39 array( "id" => $id ),
40 $asObject );
41 }
42
43 static function fetchList( $asObject = true )
44 {
45 return eZPersistentObject::fetchObjectList( eZDiscountRule::definition(),
46 null, null, null, null,
47 $asObject );
48 }
49
50 static function create()
51 {
52 $row = array(
53 "id" => null,
54 "name" => ezpI18n::tr( "kernel/shop/discountgroup", "New discount group" ) );
55 return new eZDiscountRule( $row );
56 }
57
62 static function removeByID( $id )
63 {
64 eZPersistentObject::removeObject( eZDiscountRule::definition(),
65 array( "id" => $id ) );
66 }
67 }
68 ?>
eZDiscountRule
The class eZDiscountRule does.
Definition: ezdiscountrule.php:18
eZDiscountRule\fetchList
static fetchList( $asObject=true)
Definition: ezdiscountrule.php:43
eZDiscountRule\removeByID
static removeByID( $id)
Definition: ezdiscountrule.php:62
eZDiscountRule\fetch
static fetch( $id, $asObject=true)
Definition: ezdiscountrule.php:35
eZDiscountRule\definition
static definition()
Definition: ezdiscountrule.php:19
eZDiscountRule\create
static create()
Definition: ezdiscountrule.php:50
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
ezpI18n\tr
static tr( $context, $source, $comment=null, $arguments=null)
Definition: ezpi18n.php:86
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.