当前位置: 首页>>代码示例>>PHP>>正文


PHP Events::CreateEvent方法代码示例

本文整理汇总了PHP中Events::CreateEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::CreateEvent方法的具体用法?PHP Events::CreateEvent怎么用?PHP Events::CreateEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Events的用法示例。


在下文中一共展示了Events::CreateEvent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetupCoreEvents

 /**
  * Used to setup all core event on system installation.
  *
  * @ignore
  * @return void
  */
 public static function SetupCoreEvents()
 {
     $modulename = 'Core';
     Events::CreateEvent($modulename, 'LoginPost');
     Events::CreateEvent($modulename, 'LogoutPost');
     Events::CreateEvent($modulename, 'AddUserPre');
     Events::CreateEvent($modulename, 'AddUserPost');
     Events::CreateEvent($modulename, 'EditUserPre');
     Events::CreateEvent($modulename, 'EditUserPost');
     Events::CreateEvent($modulename, 'DeleteUserPre');
     Events::CreateEvent($modulename, 'DeleteUserPost');
     Events::CreateEvent($modulename, 'AddGroupPre');
     Events::CreateEvent($modulename, 'AddGroupPost');
     Events::CreateEvent($modulename, 'EditGroupPre');
     Events::CreateEvent($modulename, 'EditGroupPost');
     Events::CreateEvent($modulename, 'DeleteGroupPre');
     Events::CreateEvent($modulename, 'DeleteGroupPost');
     Events::CreateEvent($modulename, 'AddStylesheetPre');
     Events::CreateEvent($modulename, 'AddStylesheetPost');
     Events::CreateEvent($modulename, 'EditStylesheetPre');
     Events::CreateEvent($modulename, 'EditStylesheetPost');
     Events::CreateEvent($modulename, 'DeleteStylesheetPre');
     Events::CreateEvent($modulename, 'DeleteStylesheetPost');
     Events::CreateEvent($modulename, 'AddTemplatePre');
     Events::CreateEvent($modulename, 'AddTemplatePost');
     Events::CreateEvent($modulename, 'EditTemplatePre');
     Events::CreateEvent($modulename, 'EditTemplatePost');
     Events::CreateEvent($modulename, 'DeleteTemplatePre');
     Events::CreateEvent($modulename, 'DeleteTemplatePost');
     Events::CreateEvent($modulename, 'TemplatePreCompile');
     Events::CreateEvent($modulename, 'TemplatePostCompile');
     Events::CreateEvent($modulename, 'AddGlobalContentPre');
     Events::CreateEvent($modulename, 'AddGlobalContentPost');
     Events::CreateEvent($modulename, 'EditGlobalContentPre');
     Events::CreateEvent($modulename, 'EditGlobalContentPost');
     Events::CreateEvent($modulename, 'DeleteGlobalContentPre');
     Events::CreateEvent($modulename, 'DeleteGlobalContentPost');
     Events::CreateEvent($modulename, 'GlobalContentPreCompile');
     Events::CreateEvent($modulename, 'GlobalContentPostCompile');
     Events::CreateEvent($modulename, 'ContentEditPre');
     Events::CreateEvent($modulename, 'ContentEditPost');
     Events::CreateEvent($modulename, 'ContentDeletePre');
     Events::CreateEvent($modulename, 'ContentDeletePost');
     Events::CreateEvent($modulename, 'AddUserDefinedTagPre');
     Events::CreateEvent($modulename, 'AddUserDefinedTagPost');
     Events::CreateEvent($modulename, 'EditUserDefinedTagPre');
     Events::CreateEvent($modulename, 'EditUserDefinedTagPost');
     Events::CreateEvent($modulename, 'DeleteUserDefinedTagPre');
     Events::CreateEvent($modulename, 'DeleteUserDefinedTagPost');
     Events::CreateEvent($modulename, 'ModuleInstalled');
     Events::CreateEvent($modulename, 'ModuleUninstalled');
     Events::CreateEvent($modulename, 'ModuleUpgraded');
     Events::CreateEvent($modulename, 'ContentStylesheet');
     Events::CreateEvent($modulename, 'ContentPreCompile');
     Events::CreateEvent($modulename, 'ContentPostCompile');
     Events::CreateEvent($modulename, 'ContentPostRender');
     Events::CreateEvent($modulename, 'SmartyPreCompile');
     Events::CreateEvent($modulename, 'SmartyPostCompile');
     Events::CreateEvent($modulename, 'ChangeGroupAssignPre');
     Events::CreateEvent($modulename, 'ChangeGroupAssignPost');
 }
开发者ID:Alexkuva,项目名称:Beaupotager,代码行数:67,代码来源:class.Events.php

示例2: CreateEvent

 /**
  * Inform the system about a new event that can be generated
  *
  * @final
  * @param string The name of the event
  * @returns nothing
  */
 public final function CreateEvent($eventname)
 {
     Events::CreateEvent($this->GetName(), $eventname);
 }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:11,代码来源:class.CMSModule.php

示例3: CreateEvent

function CreateEvent($inputs)
{
    include "Events.php";
    $event = new Events();
    $event->CreateEvent($inputs[0]);
}
开发者ID:Bixls,项目名称:QatarBackend,代码行数:6,代码来源:Functions.php

示例4: cms_db_prefix

                // move all the handlers
                $q = "UPDATE " . cms_db_prefix() . "event_handlers SET event_id = ? WHERE event_id = ?";
                $db->Execute($q, array($id, $event['event_id']));
                // then delete the event
                $q = "DELETE FROM " . cms_db_prefix() . "events WHERE  event_id = ?";
                $db->Execute($q, array($event['event_id']));
            } else {
                $core_events[] = $event;
            }
        }
    }
}
echo '[done]</p>';
echo '<p>Creating ChangeGroupAssign events...';
Events::CreateEvent('Core', 'ChangeGroupAssignPre');
Events::CreateEvent('Core', 'ChangeGroupAssignPost');
echo '[done]</p>';
echo '<p>Updating schema version... ';
$query = 'UPDATE ' . cms_db_prefix() . 'version SET version = 26';
$db->Execute($query);
echo '[done]</p>';
function find_event($arr, $name)
{
    foreach ($arr as $event) {
        if ($event['event_name'] == $name) {
            return $event['event_id'];
        }
    }
    return false;
}
# vim:ts=4 sw=4 noet
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:31,代码来源:upgrade.25.to.26.php


注:本文中的Events::CreateEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。