Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Order Class Reference

Public Member Functions

 tableName ()
 rules ()
 relations ()
 scopes ()
 attributeLabels ()
 search ()

Static Public Member Functions

static model ($className=__CLASS__)
static getOrder ($id_only=false)
static getUser ($id_only=false)

Public Attributes

const ORDERED = 1
const PROCESS = 0
 $verifyCode

Detailed Description

Definition at line 20 of file Order.php.

Member Function Documentation

Order::attributeLabels ( )
Returns
array customized attribute labels (name=>label)

Definition at line 94 of file Order.php.

References WebCustModule\t().

{
return array(
'id' => ShoppingcartModule::t('ID'),
'ordered' => ShoppingcartModule::t('Ordered'),
'user_id' => ShoppingcartModule::t('User'),
'shipping_info' => ShoppingcartModule::t('Shipping Info'),
'payment_info' => ShoppingcartModule::t('Payment Info'),
'verifyCode' => ShoppingcartModule::t('Verify Code'),
);
}
static Order::model (   $className = __CLASS__)
static

Returns the static model of the specified AR class.

Parameters
string$classNameactive record class name.
Returns
Order the static model class

Definition at line 34 of file Order.php.

{
return parent::model($className);
}
Order::relations ( )
Returns
array relational rules.

Definition at line 68 of file Order.php.

{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'items' => array(self::HAS_MANY, 'Item', 'order_id'),
);
}
Order::rules ( )
Returns
array validation rules for model attributes.

Definition at line 50 of file Order.php.

{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('ordered', 'numerical', 'integerOnly'=>true),
array('shipping_info, payment_info', 'length', 'max'=>1024),
array('user_id', 'length', 'max'=>10),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, ordered, user_id, tmp_user_id, shipping_info, payment_info', 'safe', 'on'=>'search'),
array('verifyCode','captcha','allowEmpty'=>!Yii::app()->user->isGuest || !CCaptcha::checkRequirements() || !Yii::app()->getModule('shoppingcart')->captchaEnabled, 'captchaAction' => '/shoppingcart/shoppingcart/captcha'),
);
}
Order::scopes ( )
Returns
array named scopes.

Definition at line 79 of file Order.php.

{
return array(
'ordered'=>array(
'condition'=>'ordered='.self::ORDERED,
),
'process'=>array(
'condition'=>'ordered='.self::PROCESS,
),
);
}
Order::search ( )

Retrieves a list of models based on the current search/filter conditions.

Returns
CActiveDataProvider the data provider that can return the models based on the search/filter conditions.

Definition at line 180 of file Order.php.

{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id,true);
$criteria->compare('ordered',$this->ordered);
$criteria->compare('user_id',$this->user_id,true);
$criteria->compare('shipping_info',$this->shipping_info,true);
$criteria->compare('payment_info',$this->order_info,true);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
Order::tableName ( )
Returns
string the associated database table name

Definition at line 42 of file Order.php.

{
return '{{order}}';
}

The documentation for this class was generated from the following file: