ILIAS
release_4-3 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilShopCouponsTableGUI.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/Payment/classes/class.ilShopTableGUI.php'
;
5
17
class
ilShopCouponsTableGUI
extends
ilShopTableGUI
18
{
26
public
function
fillRow
($a_set)
27
{
28
foreach
($a_set as $field => $value)
29
{
30
$content =
self::formatField
($field, $value);
31
$this->tpl->setVariable(
'VAL_'
. strtoupper($field), $content);
32
}
33
}
34
41
protected
function
formatField
($field, $value)
42
{
43
switch
($field)
44
{
45
case
'pc_from'
:
46
case
'pc_till'
:
47
return
self::formatDateField
($value);
48
49
case
'pc_last_changed'
:
50
return
self::formatDateTimeField
($value);
51
52
default
:
53
return
$value;
54
}
55
}
56
62
protected
static
function
formatDateField
($value)
63
{
64
if
(!strlen($value))
65
return
$value;
66
67
return
ilDatePresentation::formatDate
(
new
ilDate
($value,
IL_CAL_DATE
));
68
}
69
75
protected
static
function
formatDateTimeField
($value)
76
{
77
if
(!strlen($value))
78
return
$value;
79
80
return
ilDatePresentation::formatDate
(
new
ilDateTime
($value,
IL_CAL_DATETIME
));
81
}
82
}
Services
Payment
classes
class.ilShopCouponsTableGUI.php
Generated on Sat Apr 30 2016 19:01:08 for ILIAS by
1.8.1.2 (using
Doxyfile
)