Open Journal Systems
3.3.0
StaticPageGridCellProvider.inc.php
1
<?php
2
16
import
(
'lib.pkp.classes.controllers.grid.GridCellProvider'
);
17
import
(
'lib.pkp.classes.linkAction.request.RedirectAction'
);
18
19
class
StaticPageGridCellProvider
extends
GridCellProvider
{
20
21
//
22
// Template methods from GridCellProvider
23
//
31
function
getCellActions
($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT) {
32
$staticPage = $row->getData();
33
34
switch
($column->getId()) {
35
case
'path'
:
36
$dispatcher = $request->getDispatcher();
37
return
array(
new
LinkAction
(
38
'details'
,
39
new
RedirectAction
(
40
$dispatcher->url($request, ROUTE_PAGE,
null
) .
'/'
. $staticPage->getPath(),
41
'staticPage'
42
),
43
htmlspecialchars($staticPage->getPath())
44
));
45
default
:
46
return
parent::getCellActions($request, $row, $column, $position);
47
}
48
}
49
57
function
getTemplateVarsFromRowColumn
($row, $column) {
58
$staticPage = $row->getData();
59
60
switch
($column->getId()) {
61
case
'path'
:
62
// The action has the label
63
return
array(
'label'
=>
''
);
64
case
'title'
:
65
return
array(
'label'
=> $staticPage->getLocalizedTitle());
66
}
67
}
68
}
69
StaticPageGridCellProvider
Class for a cell provider to display information about static pages.
Definition:
StaticPageGridCellProvider.inc.php:19
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition:
LinkAction.inc.php:22
GridCellProvider
Base class for a grid column's cell provider.
Definition:
GridCellProvider.inc.php:20
RedirectAction
This action request redirects to another page.
Definition:
RedirectAction.inc.php:18
StaticPageGridCellProvider\getCellActions
getCellActions($request, $row, $column, $position=GRID_ACTION_POSITION_DEFAULT)
Definition:
StaticPageGridCellProvider.inc.php:31
StaticPageGridCellProvider\getTemplateVarsFromRowColumn
getTemplateVarsFromRowColumn($row, $column)
Definition:
StaticPageGridCellProvider.inc.php:57
plugins
generic
staticPages
controllers
grid
StaticPageGridCellProvider.inc.php
Generated on Fri Aug 28 2020 14:53:38 for Open Journal Systems by
1.8.17