1: <?php
2: /**
3: * This class defines the base IMP status notification types.
4: *
5: * Copyright 2010-2014 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (GPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/gpl.
9: *
10: * @author Michael Slusarz <slusarz@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/gpl GPL
13: * @package IMP
14: */
15: class IMP_Notification_Event_Status extends Horde_Core_Notification_Event_Status
16: {
17: /**
18: * String representation of this object.
19: *
20: * @return string String representation.
21: */
22: public function __toString()
23: {
24: switch ($this->type) {
25: case 'imp.forward':
26: $img = 'forwarded.png';
27: $label = _("Forward");
28: break;
29:
30: case 'imp.redirect':
31: $img = 'forwarded.png';
32: $label = _("Redirect");
33: break;
34:
35: case 'imp.reply':
36: case 'imp.reply_all':
37: case 'imp.reply_list':
38: $img = 'answered.png';
39: $label = _("Reply");
40: break;
41:
42: default:
43: return parent::__toString();
44: }
45:
46: return Horde_Themes_Image::tag(
47: Horde_Themes::img($img, 'imp'),
48: array('alt' => $label)
49: ) . '<div class="noticetext">' . parent::__toString() . '</div>';
50: }
51:
52: }
53: