当前位置: 首页>>代码示例>>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;未经允许,请勿转载。