Open Journal Systems
3.3.0
AnnouncementTypeGridRow.inc.php
1
<?php
2
16
import
(
'lib.pkp.classes.controllers.grid.GridRow'
);
17
import
(
'lib.pkp.classes.linkAction.request.RemoteActionConfirmationModal'
);
18
19
class
AnnouncementTypeGridRow
extends
GridRow
{
20
21
//
22
// Overridden methods from GridRow
23
//
27
function
initialize
($request, $template =
null
) {
28
parent::initialize($request, $template);
29
30
// Is this a new row or an existing row?
31
$element = $this->
getData
();
32
assert(is_a($element,
'AnnouncementType'
));
33
34
$rowId = $this->
getId
();
35
36
if
(!empty($rowId) && is_numeric($rowId)) {
37
// Only add row actions if this is an existing row
38
$router = $request->getRouter();
39
$actionArgs = array(
40
'announcementTypeId'
=> $rowId
41
);
42
$this->
addAction
(
43
new
LinkAction
(
44
'edit'
,
45
new
AjaxModal
(
46
$router->url($request,
null
,
null
,
'editAnnouncementType'
,
null
, $actionArgs),
47
__(
'grid.action.edit'
),
48
'modal_edit'
,
49
true
50
),
51
__(
'grid.action.edit'
),
52
'edit'
)
53
);
54
$this->
addAction
(
55
new
LinkAction
(
56
'remove'
,
57
new
RemoteActionConfirmationModal
(
58
$request->getSession(),
59
__(
'common.confirmDelete'
),
60
__(
'common.remove'
),
61
$router->url($request,
null
,
null
,
'deleteAnnouncementType'
,
null
, $actionArgs),
62
'modal_delete'
63
),
64
__(
'grid.action.remove'
),
65
'delete'
)
66
);
67
}
68
}
69
}
70
71
AnnouncementTypeGridRow
Announcement type grid row definition.
Definition:
AnnouncementTypeGridRow.inc.php:19
RemoteActionConfirmationModal
Class defining a simple confirmation modal with a remote action and ok/cancel buttons.
Definition:
RemoteActionConfirmationModal.inc.php:18
GridRow\addAction
addAction($action, $position=GRID_ACTION_POSITION_DEFAULT)
Definition:
GridRow.inc.php:179
GridBodyElement\getId
getId()
Definition:
GridBodyElement.inc.php:57
GridRow
GridRow implements a row of a Grid. See GridHandler for general information about grids.
Definition:
GridRow.inc.php:29
AjaxModal
A modal that retrieves its content from via AJAX.
Definition:
AjaxModal.inc.php:18
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition:
LinkAction.inc.php:22
GridRow\getData
& getData()
Definition:
GridRow.inc.php:131
AnnouncementTypeGridRow\initialize
initialize($request, $template=null)
Definition:
AnnouncementTypeGridRow.inc.php:27
lib
pkp
controllers
grid
announcements
AnnouncementTypeGridRow.inc.php
Generated on Fri Aug 28 2020 14:50:38 for Open Journal Systems by
1.8.17