Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
shoppingcart
widgets
ItemListWidget.php
1
<?php
2
/**
3
* Gentics Portal.Node PHP
4
* Author & Copyright (c) by Gentics Software GmbH
5
* sales@gentics.com
6
* http://www.gentics.com
7
* Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8
* You must not use this software without a valid license agreement.
9
*
10
* Widget for view items in users cart
11
*/
12
class
ItemListWidget
extends
BaseJuiWidget
13
{
14
/**
15
* @var string the title which shows above item list
16
*/
17
public
$title;
18
/**
19
* @var integer id of the customer
20
*/
21
public
$user_id;
22
/**
23
* @var integer number of displayed items
24
*/
25
public
$count;
26
/**
27
* @var string name of css class of unsorted list
28
*/
29
public
$class;
30
/**
31
* @var string link to the shoppingcart page
32
*/
33
public
$shoppingcart_link;
34
/**
35
* @var boolean boolean the flag which determines when item names are references
36
*/
37
public
$link_items_to_page;
38
/**
39
* Override base init. For skipping scripts and css init.
40
*
41
* @return void
42
*/
43
public
function
init
()
44
{
45
Yii::app()->user->setState(
'shoppingcart_link'
,$this->shoppingcart_link);
46
}
47
48
/**
49
* Render ItemListWidget view
50
*
51
* @return void
52
*/
53
public
function
run
()
54
{
55
$order_id = Order::getOrder(
true
);
56
57
$model =
Item::model
()->findAll(array(
'condition'
=>
'order_id=:order_id'
,
'limit'
=>$this->count,
'params'
=>array(
':order_id'
=>$order_id)));
58
59
$this->render(
'ItemListWidget'
, array(
'model'
=>$model));
60
}
61
}
Generated on Thu Jun 20 2013 14:45:15 for Gentics Portal.Node PHP API by
1.8.1.2