Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
ItemListWidget Class Reference
Inheritance diagram for ItemListWidget:
BaseJuiWidget

Public Member Functions

 init ()
 run ()
- Public Member Functions inherited from BaseJuiWidget
 getViewFile ($viewName)

Public Attributes

 $title
 $user_id
 $count
 $class
 $shoppingcart_link
 $link_items_to_page

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

Widget for view items in users cart

Definition at line 12 of file ItemListWidget.php.

Member Function Documentation

ItemListWidget::init ( )

Override base init. For skipping scripts and css init.

Returns
void

Definition at line 43 of file ItemListWidget.php.

{
Yii::app()->user->setState('shoppingcart_link',$this->shoppingcart_link);
}
ItemListWidget::run ( )

Render ItemListWidget view

Returns
void

Definition at line 53 of file ItemListWidget.php.

References Item\model().

{
$order_id = Order::getOrder(true);
if($order_id){
$model = Item::model()->findAll(array('condition'=>'order_id=:order_id','limit'=>$this->count,'params'=>array(':order_id'=>$order_id)));
}else{
$model = array();
}
$this->render('ItemListWidget', array('model'=>$model));
}

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