MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mobjectgrid.class
Ir para a documentação deste ficheiro.
1
<?php
2
class
MObjectGridColumn
extends
MGridColumn
3
{
4
var
$attribute
;
// attribute of object
5
6
function
__construct
(
$attribute
,
$title
=
''
,
$align
=
'left'
,
$nowrap
=
false
,
$width
= 0,
$visible
=
true
,
7
$options
=
null
,
$order
=
false
, $filter =
false
)
8
{
9
parent::__construct(
$title
,
$align
,
$nowrap
,
$width
,
$visible
,
$options
,
$order
, $filter);
10
$this->attribute =
$attribute
;
11
}
12
}
13
14
class
MObjectGridHyperlink
extends
MGridHyperlink
15
{
16
var
$attribute
;
// attribute of object
17
18
function
__construct
(
$attribute
,
$title
=
''
,
$href
,
$width
= 0,
$visible
=
true
,
$options
=
null
,
$order
=
false
,
19
$filter =
false
)
20
{
21
parent::__construct(
$title
,
$href
,
$width
,
$visible
,
$options
,
$order
, $filter);
22
$this->attribute =
$attribute
;
23
}
24
}
25
26
class
MObjectGridControl
extends
MGridControl
27
{
28
var
$attribute
;
// attribute of object
29
30
function
__construct
(&
$control
,
$attribute
,
$title
=
''
, $alinhamento =
null
,
$nowrap
=
false
,
$width
= 0,
31
$visible
=
true
)
32
{
33
parent::__construct(
$control
,
$title
, $alinhamento,
$nowrap
,
$width
,
$visible
);
34
$this->attribute =
$attribute
;
35
}
36
}
37
38
class
MObjectGridAction
extends
MGridAction
39
{
40
41
function
__construct
(
$type
,
$alt
,
$value
,
$href
,
$index
=
null
,
$enabled
=
true
)
42
{
43
parent::__construct(
$type
,
$alt
,
$value
,
$href
,
$enabled
,
$index
);
44
}
45
}
46
47
class
MObjectGrid
extends
MGrid
48
{
57
protected
$objArray
;
58
function
__construct
($array,
$columns
,
$href
, $pagelength = 15,
$index
= 0)
59
{
60
parent::__construct(NULL,
$columns
,
$href
, $pagelength,
$index
);
61
if
( $this->pagelength )
62
{
63
$this->pn =
new
GridNavigator
($this->pagelength, $this->rowCount, $this->GetURL($this->filtered, $this->ordered), $this);
64
}
65
$this->objArray = $array;
66
$this->data = array
67
(
68
);
69
70
$this->rowCount = count($this->objArray);
71
}
72
73
function
GenerateData
()
74
{
75
global
$page
, $state;
76
77
if
($this->objArray == NULL)
78
return
;
79
80
foreach
($this->objArray as $i => $row)
81
{
82
foreach
($this->columns as $k => $col)
83
{
84
eval(
"\$v = \$row->{$col->attribute};"
);
85
$this->data[$i][$k] = $v;
86
}
87
}
88
89
$this->orderby =
$page
->Request(
'orderby'
);
90
91
if
($this->ordered = isset($this->orderby))
92
{
93
$this->ApplyOrder($this->orderby);
94
$state->set(
'orderby'
, $this->orderby, $this->name);
95
}
96
97
if
($this->GetFiltered())
98
{
99
$this->ApplyFilter();
100
}
101
102
if
($this->pagelength)
103
{
104
$this->pn->SetGridParameters($this->pagelength, $this->rowCount, $this->GetURL($this->filtered, $this->ordered), $this);
105
$this->data = $this->GetPage();
106
}
107
else
108
$this->pn =
null
;
109
}
110
111
function
CallRowMethod
()
112
{
113
if
(isset($this->rowmethod))
114
{
115
$i =
$this->currentRow
;
116
$row = $this->data[$i];
117
call_user_func($this->rowmethod, $i, $row, $this->actions, $this->columns, $this->query);
118
}
119
}
120
}
121
122
123
?>
GridNavigator
Definição
compatibility.class:114
MComponent\$page
$page
Definição
mcomponent.class:12
MControl\$visible
$visible
Definição
mcontrol.class:95
MGridAction
Definição
gridcontrols.class:440
MGridAction\$value
$value
Definição
gridcontrols.class:444
MGridAction\$index
$index
Definição
gridcontrols.class:450
MGridAction\$alt
$alt
Definição
gridcontrols.class:443
MGridAction\$enabled
$enabled
Definição
gridcontrols.class:451
MGridAction\$type
$type
Definição
gridcontrols.class:442
MGridAction\$href
$href
Definição
gridcontrols.class:446
MGridColumn
Definição
gridcontrols.class:15
MGridColumn\$options
$options
Definição
gridcontrols.class:19
MGridColumn\$align
$align
Definição
gridcontrols.class:20
MGridColumn\$nowrap
$nowrap
Definição
gridcontrols.class:21
MGridColumn\$order
$order
Definição
gridcontrols.class:23
MGridColumn\$width
$width
Definição
gridcontrols.class:22
MGridColumn\$title
$title
Definição
gridcontrols.class:17
MGridControl
Definição
gridcontrols.class:384
MGridControl\$control
$control
Definição
gridcontrols.class:388
MGridHyperlink
Definição
gridcontrols.class:342
MGridHyperlink\$href
$href
Definição
gridcontrols.class:343
MGrid
Definição
gridcontrols.class:739
MGrid\$columns
$columns
Definição
gridcontrols.class:750
MGrid\$index
$index
Definição
gridcontrols.class:761
MGrid\$currentRow
$currentRow
Definição
gridcontrols.class:764
MGrid\$href
$href
Definição
gridcontrols.class:755
MObjectGridAction
Definição
mobjectgrid.class:39
MObjectGridAction\__construct
__construct($type, $alt, $value, $href, $index=null, $enabled=true)
Definição
mobjectgrid.class:41
MObjectGridColumn
Definição
mobjectgrid.class:3
MObjectGridColumn\__construct
__construct($attribute, $title='', $align='left', $nowrap=false, $width=0, $visible=true, $options=null, $order=false, $filter=false)
Definição
mobjectgrid.class:6
MObjectGridColumn\$attribute
$attribute
Definição
mobjectgrid.class:4
MObjectGridControl
Definição
mobjectgrid.class:27
MObjectGridControl\__construct
__construct(&$control, $attribute, $title='', $alinhamento=null, $nowrap=false, $width=0, $visible=true)
Definição
mobjectgrid.class:30
MObjectGridControl\$attribute
$attribute
Definição
mobjectgrid.class:28
MObjectGridHyperlink
Definição
mobjectgrid.class:15
MObjectGridHyperlink\$attribute
$attribute
Definição
mobjectgrid.class:16
MObjectGridHyperlink\__construct
__construct($attribute, $title='', $href, $width=0, $visible=true, $options=null, $order=false, $filter=false)
Definição
mobjectgrid.class:18
MObjectGrid
Definição
mobjectgrid.class:48
MObjectGrid\CallRowMethod
CallRowMethod()
Definição
mobjectgrid.class:111
MObjectGrid\$objArray
$objArray
Definição
mobjectgrid.class:57
MObjectGrid\GenerateData
GenerateData()
Definição
mobjectgrid.class:73
MObjectGrid\__construct
__construct($array, $columns, $href, $pagelength=15, $index=0)
Definição
mobjectgrid.class:58
classes
ui
controls
mobjectgrid.class
Gerado por
1.10.0