本文整理汇总了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")));
}
示例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")));
}
示例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);
}
示例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'));
}
}
}
示例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')));
}
}
示例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'));
}
}
示例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'])));
}
}
示例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)));
}
}
示例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'))));
}
}
示例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: 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'))));
}
}
示例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()));
}
示例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);
}
示例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'])));
}
}
示例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);
}