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


PHP BASE_CLASS_EventCollector::add方法代码示例

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


在下文中一共展示了BASE_CLASS_EventCollector::add方法的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")));
 }
开发者ID:hardikamutech,项目名称:hammu,代码行数:7,代码来源:content_provider.php

示例2: 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")));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:base_bridge.php

示例3: onCollectList

 public function onCollectList(BASE_CLASS_EventCollector $event)
 {
     $language = OW::getLanguage();
     $action = array('key' => self::ACTION_VIEW_TAGS, 'pluginKey' => $this->plugin->getKey(), 'label' => $language->text($this->plugin->getKey(), 'privacy_action_view_tags'), 'description' => '', 'defaultValue' => 'everybody');
     $event->add($action);
     $action = array('key' => self::ACTION_TAG_MY_PHOTO, 'pluginKey' => $this->plugin->getKey(), 'label' => $language->text($this->plugin->getKey(), 'privacy_action_tag_my_photo'), 'description' => '', 'defaultValue' => 'everybody');
     $event->add($action);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:8,代码来源:privacy_bridge.php

示例4: ynsocialpublisher_addAdminNotification

function ynsocialpublisher_addAdminNotification(BASE_CLASS_EventCollector $e)
{
    $language = OW::getLanguage();
    if (OW::getPluginManager()->isPluginActive('ynsocialbridge') == false) {
        $e->add($language->text('ynsocialpublisher', 'requires_configuration_message'));
    } else {
        $build = BOL_PluginService::getInstance()->findPluginByKey('ynsocialbridge')->build;
        if ($build < 2) {
            $e->add($language->text('ynsocialpublisher', 'requires_configuration_message'));
        }
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:12,代码来源:init.php

示例5: ocssitestats_add_userlist_data

function ocssitestats_add_userlist_data(BASE_CLASS_EventCollector $event)
{
    $config = OW::getConfig();
    $metricsConf = json_decode($config->getValue('ocssitestats', 'metrics'), true);
    $zeroValues = $config->getValue('ocssitestats', 'zero_values');
    $service = OCSSITESTATS_BOL_Service::getInstance();
    $count = $service->countNewUsersToday();
    if (!empty($metricsConf['new_users_today']) && ($count || $zeroValues)) {
        $event->add(array('label' => OW::getLanguage()->text('ocssitestats', 'new_users_today'), 'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'new-today')), 'iconClass' => 'ow_ic_user', 'key' => 'new-today', 'order' => 6, 'dataProvider' => array(OCSSITESTATS_BOL_Service::getInstance(), 'getNewTodayUserListData')));
    }
    $count = $service->countNewUsersThisMonth();
    if (!empty($metricsConf['new_users_this_month']) && ($count || $zeroValues)) {
        $event->add(array('label' => OW::getLanguage()->text('ocssitestats', 'new_users_this_month'), 'url' => OW::getRouter()->urlForRoute('base_user_lists', array('list' => 'new-this-month')), 'iconClass' => 'ow_ic_user', 'key' => 'new-this-month', 'order' => 7, 'dataProvider' => array($service, 'getNewThisMonthUserListData')));
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:15,代码来源:init.php

示例6: 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'));
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:init.php

示例7: 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'])));
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:console_event_handler.php

示例8: 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)));
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:init.php

示例9: 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'))));
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:init.php

示例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'));
    }
}
开发者ID:hardikamutech,项目名称:loov,代码行数:7,代码来源:init.php

示例11: 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'))));
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:init.php

示例12: 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()));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:event_handler.php

示例13: 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);
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:34,代码来源:virtual_gifts_bridge.php

示例14: 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'])));
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:console_event_handler.php

示例15: triggerCreditActionsAdd

 public function triggerCreditActionsAdd()
 {
     $e = new BASE_CLASS_EventCollector('usercredits.action_add');
     foreach ($this->actions as $action) {
         $e->add($action);
     }
     OW::getEventManager()->trigger($e);
 }
开发者ID:tammyrocks,项目名称:photo,代码行数:8,代码来源:credits.php


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