當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OW_Event::add方法代碼示例

本文整理匯總了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')));
    }
}
開發者ID:vazahat,項目名稱:dudex,代碼行數:7,代碼來源:init.php

示例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)));
 }
開發者ID:hardikamutech,項目名稱:loov,代碼行數:29,代碼來源:event_handler.php

示例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));
 }
開發者ID:jorgemunoz8807,項目名稱:havanabook,代碼行數:5,代碼來源:event_handler.php


注:本文中的OW_Event::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。