本文整理汇总了PHP中BASE_CLASS_EventCollector类的典型用法代码示例。如果您正苦于以下问题:PHP BASE_CLASS_EventCollector类的具体用法?PHP BASE_CLASS_EventCollector怎么用?PHP BASE_CLASS_EventCollector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BASE_CLASS_EventCollector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onCollectTypes
public function onCollectTypes(BASE_CLASS_EventCollector $event)
{
$mandatoryApprove = OW::getConfig()->getValue('base', 'mandatory_user_approve');
$event->add(array("pluginKey" => "base", "authorizationGroup" => "base", "group" => "profiles", "entityType" => self::ENTITY_TYPE_PROFILE, "groupLabel" => OW::getLanguage()->text("base", "content_profiles_label"), "entityLabel" => OW::getLanguage()->text("base", "content_profile_label"), "displayFormat" => "empty", "moderation" => $mandatoryApprove ? array(BOL_ContentService::MODERATION_TOOL_FLAG, BOL_ContentService::MODERATION_TOOL_APPROVE) : array(BOL_ContentService::MODERATION_TOOL_FLAG)));
$event->add(array("pluginKey" => "base", "authorizationGroup" => "base", "group" => "comments", "entityType" => self::ENTITY_TYPE_COMMENT, "groupLabel" => OW::getLanguage()->text("base", "content_comments_label"), "entityLabel" => OW::getLanguage()->text("base", "content_comment_label"), "moderation" => array(BOL_ContentService::MODERATION_TOOL_FLAG)));
$event->add(array("pluginKey" => "base", "authorizationGroup" => "base", "group" => "avatars", "entityType" => self::ENTITY_TYPE_AVATAR, "groupLabel" => OW::getLanguage()->text("base", "content_avatars_label"), "entityLabel" => OW::getLanguage()->text("base", "content_avatar_label")));
}
示例2: collectSnippets
public function collectSnippets(BASE_CLASS_EventCollector $event)
{
$language = OW::getLanguage();
$params = $event->getParams();
if ($params["entityType"] != SNIPPETS_CLASS_EventHandler::ENTITY_TYPE_USER) {
return;
}
$userId = $params["entityId"];
$preview = $params["preview"];
$snippet = new SNIPPETS_CMP_Snippet(self::WIDGET_NAME, $userId);
if ($preview) {
$snippet->setLabel($language->text("snippets", "snippet_virtual_gifts_preview"));
$snippet->setIconClass("ow_ic_birthday");
$event->add($snippet);
return;
}
$service = VIRTUALGIFTS_BOL_VirtualGiftsService::getInstance();
$total = $service->countUserReceivedGifts($userId);
$list = $service->findUserReceivedGifts($userId, 1, 4);
if (empty($list)) {
return;
}
$images = array();
foreach ($list as $gift) {
$images[] = $gift["imageUrl"];
}
$dispslayType = count($images) > 1 ? SNIPPETS_CMP_Snippet::DISPLAY_TYPE_4 : SNIPPETS_CMP_Snippet::DISPLAY_TYPE_1;
$url = OW::getRouter()->urlForRoute('virtual_gifts_user_list', array("userName" => BOL_UserService::getInstance()->getUserName($userId)));
$snippet->setImages($images);
$snippet->setLabel($language->text("snippets", "snippet_virtual_gifts", array("count" => '<span class="ow_txt_value">' . $total . '</span>')));
$snippet->setUrl($url);
$snippet->setDisplayType($dispslayType);
$event->add($snippet);
}
示例3: payeer_add_admin_notification
function payeer_add_admin_notification(BASE_CLASS_EventCollector $coll)
{
$billingService = BOL_BillingService::getInstance();
if (!mb_strlen($billingService->getGatewayConfigValue(BILLINGPAYEER_CLASS_PayeerAdapter::GATEWAY_KEY, 'm_key')) && !mb_strlen($billingService->getGatewayConfigValue(BILLINGPAYEER_CLASS_PayeerAdapter::GATEWAY_KEY, 'm_shop'))) {
$coll->add(OW::getLanguage()->text('billingpayeer', 'plugin_configuration_notice', array('url' => OW::getRouter()->urlForRoute('billing_payeer_admin'))));
}
}
示例4: ganalytics_admin_notification
function ganalytics_admin_notification(BASE_CLASS_EventCollector $event)
{
$wpid = OW::getConfig()->getValue('ganalytics', 'web_property_id');
if (empty($wpid)) {
$event->add(OW::getLanguage()->text('ganalytics', 'admin_notification_text', array('link' => OW::getRouter()->urlForRoute('ganalytics_admin'))));
}
}
示例5: ynmediaimporter_addAdminNotification
function ynmediaimporter_addAdminNotification(BASE_CLASS_EventCollector $e)
{
$language = OW::getLanguage();
if (OW::getPluginManager()->isPluginActive('ynsocialbridge') == false) {
$e->add($language->text('ynmediaimporter', 'requires_configuration_message'));
}
}
示例6: contactus_handler_after_install
function contactus_handler_after_install(BASE_CLASS_EventCollector $event)
{
if (count(CONTACTUS_BOL_Service::getInstance()->getDepartmentList()) < 1) {
$url = OW::getRouter()->urlForRoute('contactus.admin');
$event->add(OW::getLanguage()->text('contactus', 'after_install_notification', array('url' => $url)));
}
}
示例7: getNewItems
public function getNewItems(BASE_CLASS_EventCollector $event)
{
$params = $event->getParams();
if ($params['page'] == self::CONSOLE_PAGE_KEY) {
$event->add(array(self::CONSOLE_SECTION_KEY => new FRIENDS_MCMP_ConsoleNewItems($params['timestamp'])));
}
}
示例8: getNewInvitations
public function getNewInvitations(BASE_CLASS_EventCollector $event)
{
$params = $event->getParams();
if ($params['page'] == self::CONSOLE_NOTIFICATIONS_PAGE_KEY) {
$event->add(array(self::CONSOLE_INVITATIONS_SECTION_KEY => new BASE_MCMP_ConsoleNewInvitations($params['timestamp'])));
}
}
示例9: onCollectInfoConfigs
public function onCollectInfoConfigs(BASE_CLASS_EventCollector $event)
{
$language = OW::getLanguage();
$event->add(array("key" => "base-gender-age", "label" => $language->text("uheader", "info-gender-age-label")));
$event->add(array("key" => "base-about", "label" => $language->text("uheader", "info-about-label")));
$event->add(array("key" => "base-question", "label" => $language->text("uheader", "info-question-label")));
}
示例10: hotlist_usercredits_active
function hotlist_usercredits_active(BASE_CLASS_EventCollector $event)
{
if (!OW::getPluginManager()->isPluginActive('usercredits')) {
$language = OW::getLanguage();
$event->add($language->text('hotlist', 'error_usercredits_not_installed'));
}
}
示例11: onCollectButtonList
public function onCollectButtonList(BASE_CLASS_EventCollector $event)
{
$cssUrl = OW::getPluginManager()->getPlugin('FBCONNECT')->getStaticCssUrl() . 'fbconnect.css';
OW::getDocument()->addStyleSheet($cssUrl);
$button = new FBCONNECT_MCMP_ConnectButton();
$event->add(array('iconClass' => 'owm_ico_signin_f', 'markup' => $button->render()));
}
示例12: onCollectVirtualGiftsAuthLabels
public function onCollectVirtualGiftsAuthLabels(BASE_CLASS_EventCollector $event)
{
if (!OW::getPluginManager()->isPluginActive("virtualgifts")) {
return;
}
$language = OW::getLanguage();
$event->add(array('virtualgifts' => array('label' => $language->text('virtualgifts', 'auth_group_label'), 'actions' => array('send_gift' => $language->text('virtualgifts', 'auth_action_label_send_gift')))));
}
示例13: socialsharing_add_admin_notification
function socialsharing_add_admin_notification(BASE_CLASS_EventCollector $coll)
{
$config = OW::getConfig();
if ($config->getValue('socialsharing', 'api_key')) {
return;
}
$coll->add(OW::getLanguage()->text('socialsharing', 'plugin_installation_notice', array('url' => OW::getRouter()->urlForRoute('socialsharing.admin'))));
}
示例14: triggerCreditActionsAdd
public function triggerCreditActionsAdd()
{
$e = new BASE_CLASS_EventCollector('usercredits.action_add');
foreach ($this->actions as $action) {
$e->add($action);
}
OW::getEventManager()->trigger($e);
}
示例15: onCollectAdminNotification
public function onCollectAdminNotification(BASE_CLASS_EventCollector $e)
{
$language = OW::getLanguage();
$configs = OW::getConfig()->getValues('fbconnect');
if (empty($configs['app_id']) || empty($configs['api_secret'])) {
$e->add($language->text('fbconnect', 'admin_configuration_required_notification', array('href' => OW::getRouter()->urlForRoute('fbconnect_configuration'))));
}
}