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


PHP OW_Component::onBeforeRender方法代码示例

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


在下文中一共展示了OW_Component::onBeforeRender方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $this->assign("uniqId", $this->uniqId);
     $this->assign("snippets", $this->snippets);
     $this->initStatic();
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:7,代码来源:snippets.php

示例2: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $displayCount = 60;
     $list = $this->getList();
     $idList = empty($list['idList']) ? array() : $list['idList'];
     $allList = BOL_AvatarService::getInstance()->getDataForUserAvatars($idList, true, false, true, false);
     $allList = empty($allList) ? array() : $allList;
     $cachelist = array();
     foreach ($allList as $uid => $info) {
         $info['userId'] = $uid;
         $info['kw'] = strtolower($info['title']);
         $cachelist[$uid] = $info;
     }
     $tplList = array_slice($cachelist, 0, $displayCount);
     $this->initJs($cachelist, $list['count']);
     $this->assign('list', $tplList);
     $this->assign('friendsMode', $this->friendsMode);
     $this->assign('uniqId', $this->uniqId);
     $language = OW::getLanguage();
     $this->assign('langs', array('ask' => $language->text('equestions', 'user_select_button_ask')));
     $this->assign('fakeAvatar', array('src' => '-', 'title' => '-'));
     $moderator = OW::getUser()->isAuthorized('equestions');
     $this->assign('moderator', $moderator);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:user_selector.php

示例3: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $this->assign('uniqId', $this->uniqId);
     $language = OW::getLanguage();
     $this->assign('langs', array('uploadSave' => $language->text('attachments', 'attachments_upload_save_label'), 'takeSave' => $language->text('attachments', 'attachments_take_save_label'), 'cancel' => $language->text('attachments', 'attachments_cancel_label'), 'close' => $language->text('attachments', 'attachments_close_label'), 'chooseImage' => $language->text('attachments', 'attachments_choose_image_label')));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:attachment_image.php

示例4: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $uniqId = uniqid('questionAdd');
     $this->assign('uniqId', $uniqId);
     $config = OW::getConfig()->getValues(EQUESTIONS_Plugin::PLUGIN_KEY);
     $this->assign('configs', $config);
     $form = $this->initForm();
     $this->addForm($form);
     EQUESTIONS_Plugin::getInstance()->addStatic();
     $attachmentsId = null;
     if ($config['attachments']) {
         $types = array();
         if ($config['attachments_image']) {
             $types[] = 'image';
         }
         if ($config['attachments_video']) {
             $types[] = 'video';
         }
         if ($config['attachments_link']) {
             $types[] = 'link';
         }
         $attachments = new EQUESTIONS_CMP_Attachments($types);
         $attachments->initJs();
         $this->addComponent('attachments', $attachments);
         $attachmentsId = $attachments->getUniqId();
     }
     $js = UTIL_JsGenerator::newInstance()->newObject('questionsAdd', 'QUESTIONS_QuestionAdd', array($uniqId, $form->getName(), array('maxQuestionLength' => 500, 'minQuestionLength' => 3, 'maxAnswerLength' => 150), $attachmentsId));
     OW::getDocument()->addOnloadScript($js);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:30,代码来源:question_add.php

示例5: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $userList = array();
     $userDtoList = array();
     $userService = BOL_UserService::getInstance();
     $questionService = BOL_QuestionService::getInstance();
     $userIdList = array_keys($this->userList);
     $userDataList = BOL_QuestionService::getInstance()->getQuestionData($userIdList, $this->fieldList);
     foreach ($userService->findUserListByIdList($userIdList) as $userDto) {
         $userDtoList[$userDto->id] = $userDto;
     }
     foreach ($this->userList as $userId => $fieldList) {
         $fields = array_diff(array_keys($fieldList), $this->fieldList);
         $fieldsData = $questionService->getQuestionData(array($userId), $fields);
         $userList[$userId]['fields'] = array_merge(!empty($userDataList[$userId]) ? $userDataList[$userId] : array(), !empty($fieldsData[$userId]) ? $fieldsData[$userId] : array(), $fieldList);
         $userList[$userId]['dto'] = $userDtoList[$userId];
     }
     $this->assign('userList', $userList);
     $this->assign('avatars', BOL_AvatarService::getInstance()->getAvatarsUrlList($userIdList, 2));
     $this->assign('onlineList', !empty($userIdList) ? $userService->findOnlineStatusForUserList($userIdList) : array());
     $this->assign('usernameList', $userService->getUserNamesForList($userIdList));
     $this->assign('displaynameList', $userService->getDisplayNamesForList($userIdList));
     $this->assign('displayActivity', $this->displayActivity);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:25,代码来源:user_list.php

示例6: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $viewAllUrl = OW::getRouter()->urlForRoute('mailbox_messages_default');
     $this->assign('viewAllUrl', $viewAllUrl);
     $conversationService = MAILBOX_BOL_ConversationService::getInstance();
     $activeModeList = $conversationService->getActiveModeList();
     $mailModeEnabled = in_array('mail', $activeModeList) ? true : false;
     $this->assign('mailModeEnabled', $mailModeEnabled);
     $actionName = 'send_message';
     $event = new OW_Event('mailbox.show_send_message_button', array(), false);
     OW::getEventManager()->trigger($event);
     $showSendMessage = $event->getData();
     $isAuthorizedSendMessage = $showSendMessage && OW::getUser()->isAuthorized('mailbox', $actionName);
     if (!$isAuthorizedSendMessage) {
         $status = BOL_AuthorizationService::getInstance()->getActionStatus('mailbox', $actionName);
         if ($status['status'] == BOL_AuthorizationService::STATUS_PROMOTED) {
             $script = '$("#mailboxConsoleListSendMessageBtn").click(function(){
                 OW.authorizationLimitedFloatbox(' . json_encode($status['msg']) . ');
             });';
             OW::getDocument()->addOnloadScript($script);
             $isAuthorizedSendMessage = true;
             //this service is promoted
         }
     }
     $this->assign('isAuthorizedSendMessage', $isAuthorizedSendMessage);
 }
开发者ID:tammyrocks,项目名称:mailbox,代码行数:27,代码来源:console_list.php

示例7: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $this->initStatic();
     $this->assign("uniqId", $this->uniqId);
     $this->assign("name", $this->fieldName);
     $this->assign("snippets", $this->getSnippets());
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:8,代码来源:settings.php

示例8: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $this->assign('avatar', $this->avatar);
     $this->assign('content', $this->content);
     $this->assign('toolbar', $this->toolbar);
     $this->assign('contentImage', $this->contentImage);
     $this->assign('url', $this->url);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:9,代码来源:console_list_ipc_item.php

示例9: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $showId = $this->assignUniqidVar('showId');
     $deleteId = $this->assignUniqidVar('deleteId');
     $backId = $this->assignUniqidVar('backId');
     $containerId = $this->assignUniqidVar('containerId');
     OW::getDocument()->addOnloadScript("\n            ;function exitBulkOptions(){\n                \$('#{$containerId}').fadeOut(function(){\n                    \$('#{$showId}').parent().parent().fadeIn();\n                    \$(this).parents('.ow_fw_menu').find('.ow_admin_date_filter').fadeIn();\n                    \$('.ow_photo_context_action').show();\n                    \$('.ow_photo_item .ow_photo_chekbox_area').hide();\n                });\n            }\n            \$('#{$deleteId}').click(function(){\n                var deleteIds = [];\n\n                \$('.ow_photo_item.ow_photo_item_checked').each(function(){\n                    deleteIds.push(\$(this).closest('.ow_photo_item_wrap').data('photoId'));\n                });\n                photoContextAction.deleteImages(deleteIds);\n                exitBulkOptions();\n            });\n            \$('#{$showId}').click(function(){\n                \$('.ow_photo_item.ow_photo_item_checked').toggleClass('ow_photo_item_checked');\n                \$(this).parents('.ow_fw_menu').find('.ow_admin_date_filter').fadeOut();\n                \$('#{$showId}').parent().parent().fadeOut(function(){\n                    \$('#{$containerId}').fadeIn();\n                    \$('.ow_photo_context_action').hide();\n                    \$('.ow_photo_item .ow_photo_chekbox_area').show();\n                });\n            });\n            \$('#{$backId}').click(function(){\n                exitBulkOptions();\n            });\n            \$('.ow_photo_list').on('click', '.ow_photo_checkbox, .ow_photo_chekbox_area', function(e){\n                e.stopPropagation();\n                \$(this).parents('.ow_photo_item').toggleClass('ow_photo_item_checked');\n            });");
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:9,代码来源:uploaded_files_bulk_options.php

示例10: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $count = 42;
     $photos = $this->bridge->findUserPhotos($this->userId, 0, $count);
     $this->addComponent('photoList', new UHEADER_CMP_MyPhotoList($photos));
     $js = UTIL_JsGenerator::composeJsString('UHEADER.GallerySwitcher.registerTab({$tabKey}, new UHEADER.PhotoSelector({$params}, _scope));', array('params' => array('responder' => OW::getRouter()->urlFor('UHEADER_CTRL_Header', 'rsp'), 'userId' => $this->userId, 'tabKey' => $this->tabKey, 'listFull' => count($photos) < $count), "tabKey" => $this->tabKey));
     OW::getDocument()->addOnloadScript($js);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:9,代码来源:my_photos.php

示例11: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $bridge = EQUESTIONS_CLASS_VideoBridge::getInstance();
     $this->assign('videoActive', $bridge->isActive());
     $this->assign('uniqId', $this->uniqId);
     $language = OW::getLanguage();
     $this->assign('langs', array('cancel' => $language->text('equestions', 'attachments_cancel_label'), 'close' => $language->text('equestions', 'attachments_close_label'), 'addEmbed' => $language->text('equestions', 'attachments_add_embed_label'), 'search' => $language->text('equestions', 'attachments_add_search_label'), 'addVideo' => $language->text('equestions', 'attachments_add_video_label'), 'chooseMy' => $language->text('equestions', 'attachments_choose_my_video_label')));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:9,代码来源:attachment_video.php

示例12: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $language = OW::getLanguage();
     $configs = OW::getConfig()->getValues('questions');
     $optionTotal = QUESTIONS_BOL_Service::getInstance()->findOptionCount($this->question->id);
     $answerCount = QUESTIONS_BOL_Service::getInstance()->findTotalAnswersCount($this->question->id);
     $postCount = BOL_CommentService::getInstance()->findCommentCount(QUESTIONS_BOL_Service::ENTITY_TYPE, $this->question->id);
     $questionUrl = OW::getRouter()->urlForRoute('questions-question', array('qid' => $this->question->id));
     $count = QUESTIONS_BOL_Service::DISPLAY_COUNT;
     if ($optionTotal - $count < 2) {
         $count = $optionTotal;
     }
     $answers = new QUESTIONS_CMP_Answers($this->question, $optionTotal, array(0, $count));
     $answers->setTotalAnswerCount($answerCount);
     $answers->setUsersContext($this->getContextUserIds());
     $bubbleActivity = $this->getBubbleActivity();
     $jsSelector = 'QUESTIONS_AnswerListCollection.' . $answers->getUniqId();
     $text = $this->getItemString($bubbleActivity, $jsSelector, $questionUrl);
     $avatars = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($bubbleActivity->userId));
     $allowPopups = !isset($configs['allow_popups']) || $configs['allow_popups'];
     $features = array();
     $onClickStr = "window.location.href='{$questionUrl}'";
     if ($configs['allow_comments']) {
         if ($allowPopups) {
             $onClickStr = "return {$jsSelector}.openQuestionDelegate(true);";
         }
         $features[] = array('class' => 'q-' . $answers->getUniqId() . '-status-comments', 'iconClass' => 'ow_miniic_comment', 'label' => $postCount, 'onclick' => $onClickStr, 'string' => null);
     }
     if ($allowPopups) {
         $onClickStr = "return {$jsSelector}.openQuestionDelegate();";
     }
     $features[] = array('class' => 'q-' . $answers->getUniqId() . '-status-votes', 'iconClass' => 'questions_miniicon_check', 'label' => $answerCount, 'onclick' => $onClickStr, 'string' => null);
     if ($configs['enable_follow']) {
         $onClickStr = "OW.error('" . $language->text('questions', 'follow_not_allowed') . "')";
         $isFollowing = false;
         if (QUESTIONS_BOL_Service::getInstance()->isCurrentUserCanInteract($this->question)) {
             $userId = OW::getUser()->getId();
             $isFollowing = QUESTIONS_BOL_Service::getInstance()->isFollow($userId, $this->question->id);
             $onClickStr = $isFollowing ? $jsSelector . '.unfollowQuestion();' : $jsSelector . '.followQuestion();';
         } else {
             if (OW::getUser()->isAuthenticated()) {
                 $isFollowing = QUESTIONS_BOL_Service::getInstance()->isFollow($userId, $this->question->id);
                 if ($isFollowing) {
                     $onClickStr = $jsSelector . '.unfollowQuestion();';
                 }
             }
         }
         $features[] = array('class' => 'q-' . $answers->getUniqId() . '-status-follows', 'iconClass' => 'questions_miniic_follow', 'label' => QUESTIONS_BOL_Service::getInstance()->findFollowsCount($this->question->id), 'onclick' => $onClickStr, 'active' => $isFollowing);
     }
     $settings = $this->question->getSettings();
     $context = empty($settings['context']['url']) || empty($settings['context']['label']) ? null : array('url' => $settings['context']['url'], 'label' => $settings['context']['label']);
     $tplQuestion = array('questionId' => $this->question->id, 'uniqId' => $this->getUniqId(), 'text' => $text, 'timeStamp' => UTIL_DateTime::formatDate($bubbleActivity->timeStamp), 'lastItem' => $this->lastItem, 'answers' => $answers->render(), 'avatar' => $avatars[$bubbleActivity->userId], 'settings' => $settings, 'context' => $context, 'features' => $features, 'permalink' => $questionUrl);
     $event = new OW_Event(QUESTIONS_BOL_Service::EVENT_ON_LIST_ITEM_RENDER, array("questionId" => $this->question->id, "questionDto" => $this->question, "text" => $text, "settings" => $settings, "uniqId" => $this->getUniqId()), $tplQuestion);
     OW::getEventManager()->trigger($event);
     $this->assign('item', $event->getData());
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:57,代码来源:feed_item.php

示例13: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $id = uniqid('filter');
     $this->assign('id', $id);
     $images = BOL_ThemeService::getInstance()->findAllCssImages();
     $this->assign('dates', $this->getDates($images));
     $jsString = ";\$('#{$id} ul li a').click(function(e){\n            e.preventDefault();\n            window.browsePhoto.filter({'date': \$(this).data('date')});\n            \$(this).parents('.ow_context_action').find('.ow_context_action_value span').html(\$(this).html());\n        });\n        ";
     OW::getDocument()->addOnloadScript($jsString);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:10,代码来源:uploaded_files_filter.php

示例14: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     if (!empty($this->url) && !empty($this->backUri)) {
         $this->url = OW::getRequest()->buildUrlQueryString($this->url, array('backUri' => $this->getBackUri()));
     }
     $this->addComponent('entityList', $this->getListCmp());
     $this->assign('url', $this->url);
     $this->assign('viewAllLabel', $this->label);
     $this->assign('displayViewAllButton', $this->display);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:11,代码来源:map_entity_list.php

示例15: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $options = array();
     $js = UTIL_JsGenerator::newInstance();
     $js->callFunction(array("UHEADER.GallerySwitcher", "init"), array($this->uniqId, $options));
     OW::getDocument()->addOnloadScript($js);
     $this->assign("uniqId", $this->uniqId);
     $this->assign("tabs", $this->getTabs());
     $this->assign("dimensions", $this->getDimensions());
 }
开发者ID:vazahat,项目名称:dudex,代码行数:11,代码来源:gallery.php


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