File: kronolith.php

package info (click to toggle)
kronolith 1.1.4-2sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,212 kB
  • ctags: 1,074
  • sloc: php: 4,187; sh: 724; xml: 522; makefile: 96; sql: 42; perl: 20
file content (43 lines) | stat: -rw-r--r-- 1,295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
// $Horde: kronolith/lib/Notification/kronolith.php,v 1.3.2.1 2003/01/03 13:23:36 jan Exp $

require_once HORDE_BASE . '/lib/Notification/status.php';

/**
 * The Notification_status_Kronolith:: class extends the Notification_status::
 * class to display the messages for Kronolith's special message types
 * 'kronolith.alarm' and 'kronolith.event'.
 *
 * @author  Jan Schneider <jan@horde.org>
 * @version $Revision: 1.3.2.1 $
 * @since   Kronolith 1.0
 * @package horde.notification
 */
class Notification_status_kronolith extends Notification_status {

    /**
     * Outputs one message if it's a Kronolith message or calls the
     * parent method otherwise.
     *
     * @param array $message    One message hash from the stack.
     */
    function getMessage($message)
    {
        switch ($message['type']) {
        case 'kronolith.alarm':
            echo '<tr><td class="control">' . Horde::img('alarm.gif') . '&nbsp;&nbsp;<b>' . $message['message'] . '</b></td></tr>';
            break;

        case 'kronolith.event':
            echo '<tr><td class="control">' . Horde::img('event.gif') . '&nbsp;&nbsp;<b>' . $message['message'] . '</b></td></tr>';
            break;

        default:
            parent::getMessage($message);
            break;

        }
    }

}
?>