function handlerList()
 {
     $availableHandlers = eZNotificationEventFilter::availableHandlers();
     return array('result' => $availableHandlers);
 }
 static function fetchHandlersForUser($time, $address)
 {
     $db = eZDB::instance();
     $time = (int) $time;
     $address = $db->escapeString($address);
     $query = "select distinct handler\n                  from eznotificationcollection,\n                       eznotificationcollection_item\n                  where eznotificationcollection_item.collection_id = eznotificationcollection.id and\n                        address='{$address}' and\n                        send_date != 0 and\n                        send_date < {$time}";
     $handlerResult = $db->arrayQuery($query);
     $handlers = array();
     $availableHandlers = eZNotificationEventFilter::availableHandlers();
     foreach ($handlerResult as $handlerName) {
         $handlers[$handlerName['handler']] = $availableHandlers[$handlerName['handler']];
     }
     return $handlers;
 }
 static function cleanup()
 {
     $availableHandlers = eZNotificationEventFilter::availableHandlers();
     $db = eZDB::instance();
     $db->begin();
     foreach ($availableHandlers as $handler) {
         if ($handler !== false) {
             $handler->cleanup();
         }
     }
     $db->commit();
 }
Beispiel #4
0
<?php
/**
 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 * @version //autogentag//
 * @package kernel
 */

$http = eZHTTPTool::instance();

$Module = $Params['Module'];

$user = eZUser::currentUser();

$availableHandlers = eZNotificationEventFilter::availableHandlers();


$db = eZDB::instance();
$db->begin();
if ( $http->hasPostVariable( 'Store' ) )
{
    foreach ( $availableHandlers as $handler )
    {
        $handler->storeSettings( $http, $Module );
    }

}

foreach ( $availableHandlers as $handler )
{
    $handler->fetchHttpInput( $http, $Module );