function createNotificationEvent($subType = false)
 {
     $handler = $this->attribute('handler');
     $info = $handler->attribute('info');
     $type = $info['type-identifier'];
     if ($subType) {
         $type .= '_' . $subType;
     }
     $event = eZNotificationEvent::create('ezcollaboration', array('collaboration_id' => $this->attribute('id'), 'collaboration_identifier' => $type));
     $event->store();
     return $event;
 }
示例#2
0
<?php

/**
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 * @version  2012.6
 * @package kernel
 */
$http = eZHTTPTool::instance();
$Module = $Params['Module'];
$tpl = eZTemplate::factory();
$tpl->setVariable('filter_proccessed', false);
$tpl->setVariable('time_event_created', false);
if ($http->hasPostVariable('RunFilterButton')) {
    eZNotificationEventFilter::process();
    $tpl->setVariable('filter_proccessed', true);
} else {
    if ($http->hasPostVariable('SpawnTimeEventButton')) {
        $event = eZNotificationEvent::create('ezcurrenttime', array());
        $event->store();
        $tpl->setVariable('time_event_created', true);
    }
}
$Result = array();
$Result['content'] = $tpl->fetch('design:notification/runfilter.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('kernel/notification', 'Notification settings')));
 public static function createNotificationEvent($objectID, $versionNum)
 {
     $event = eZNotificationEvent::create('ezpublish', array('object' => $objectID, 'version' => $versionNum));
     $event->store();
 }
 public static function createNotificationEvent($action, $uuid, $list_id)
 {
     $event = eZNotificationEvent::create('jaj_newsletter', array('action' => $action, 'uuid' => $uuid, 'list_id' => $list_id));
     $event->store();
 }