本文整理汇总了PHP中OW_Event::add方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Event::add方法的具体用法?PHP OW_Event::add怎么用?PHP OW_Event::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Event
的用法示例。
在下文中一共展示了OW_Event::add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: profile_progressbar_collect_info_config
function profile_progressbar_collect_info_config(OW_Event $event)
{
$params = $event->getParams();
if (in_array($params['line'], array(HINT_BOL_Service::INFO_LINE0, HINT_BOL_Service::INFO_LINE1, HINT_BOL_Service::INFO_LINE2))) {
$event->add(array('key' => 'profileprogressbar', 'label' => OW::getLanguage()->text('profileprogressbar', 'user_hint_caption')));
}
}
示例2: addProfileActionToolbar
public function addProfileActionToolbar(OW_Event $event)
{
$params = $event->getParams();
if (!OW::getUser()->isAuthenticated() || $params['userId'] == OW::getUser()->getId()) {
return;
}
$uniqId = uniqid('bookmarks-');
$languages = OW::getLanguage();
$markLabel = $languages->text('bookmarks', 'mark_toolbar_label');
$unMarkLabel = $languages->text('bookmarks', 'unmark_toolbar_label');
$label = BOOKMARKS_BOL_Service::getInstance()->isMarked(OW::getUser()->getId(), $params['userId']) ? $unMarkLabel : $markLabel;
$event->add(array(BASE_CMP_ProfileActionToolbar::DATA_KEY_ITEM_KEY => "bookmark.action", BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_ID => $uniqId, BASE_CMP_ProfileActionToolbar::DATA_KEY_LABEL => $label, BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_ORDER => 5));
OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString(';var bookmarkBtn = $("#" + {$id}).bind("click", function(event)
{
BOOKMARKS.markState({$userId}, function( data, textStatus, jqXHR )
{
if ( data.mark === true )
{
OW.info(\'<div class="clearfix bookmarks_wrap"><span>\' + {$markedNotifyMessage} + \'</span><span class="ow_left boomarks_ic_wrap bookmarks_ic_bookmark_white"></span></div>\');
bookmarkBtn.html({$unMarkLabel});
}
else
{
OW.info(\'<div class="clearfix bookmarks_wrap"><span>\' + {$unMarkedNotifyMessage} + \'</span><span class="ow_left boomarks_ic_wrap bookmarks_ic_bookmark_white"></span></div>\');
bookmarkBtn.html({$markLabel});
}
});
});', array('id' => $uniqId, 'userId' => $params['userId'], 'markedNotifyMessage' => $languages->text('bookmarks', 'marked_notify_message', array('bookmarksListURL' => OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_LATEST)))), 'unMarkedNotifyMessage' => $languages->text('bookmarks', 'unmarked_notify_message', array('bookmarksListURL' => OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_LATEST)))), 'unMarkLabel' => $unMarkLabel, 'markLabel' => $markLabel)));
}
示例3: notificationActions
public function notificationActions(OW_Event $event)
{
$event->add(array('section' => 'birthdays', 'action' => 'comment', 'sectionIcon' => 'ow_ic_calendar', 'sectionLabel' => OW::getLanguage()->text('birthdays', 'email_notifications_section_label'), 'description' => OW::getLanguage()->text('birthdays', 'email_notifications_setting_status_comment'), 'selected' => true));
$event->add(array('section' => 'birthdays', 'action' => 'like', 'sectionIcon' => 'ow_ic_calendar', 'sectionLabel' => OW::getLanguage()->text('birthdays', 'email_notifications_section_label'), 'description' => OW::getLanguage()->text('birthdays', 'email_notifications_setting_status_like'), 'selected' => true));
}