Logo Search packages:      
Sourcecode: nag2 version File versions  Download package

Nag::listAlarms ( date )

Returns all the alarms active right on $date.

object$dateThe start of the time range.
array The alarms (alarmId) active on $date.

Definition at line 212 of file Nag.php.

References Nag_Driver::singleton().

        $tasks = array();

        foreach ($GLOBALS['display_tasklists'] as $tasklist) {
            /* Create a Nag storage instance. */
            $storage = &Nag_Driver::singleton($tasklist);

            /* Retrieve the alarms for the task list. */
            $newtasks = $storage->listAlarms($date);
            if (is_a($newtasks, 'PEAR_Error')) {
                return $newtasks;

            /* Don't show an alarm for complete tasks. */
            foreach ($newtasks as $taskID => $task) {
                if (!empty($task['completed'])) {

            $tasks = array_merge($tasks, $newtasks);

        return $tasks;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index