ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4require_once 'Services/Payment/classes/class.ilShopTableGUI.php';
5
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
68 }
69
75 protected static function formatDateTimeField($value)
76 {
77 if(!strlen($value))
78 return $value;
79
81 }
82}
const IL_CAL_DATE
const IL_CAL_DATETIME
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Class for single dates.
Class ilShopCouponsTableGUI.
Class ilShopTableGUI.