本文整理汇总了PHP中OW_Component::render方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Component::render方法的具体用法?PHP OW_Component::render怎么用?PHP OW_Component::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Component
的用法示例。
在下文中一共展示了OW_Component::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getComponentMarkup
protected function getComponentMarkup(OW_Component $cmp)
{
/* @var $document OW_AjaxDocument */
$document = OW::getDocument();
$responce = array();
$responce['content'] = trim($cmp->render());
$beforeIncludes = $document->getScriptBeforeIncludes();
if (!empty($beforeIncludes)) {
$responce['beforeIncludes'] = $beforeIncludes;
}
foreach ($document->getScripts() as $script) {
$responce['scriptFiles'][] = $script;
}
$onloadScript = $document->getOnloadScript();
if (!empty($onloadScript)) {
$responce['onloadScript'] = $onloadScript;
}
$styleDeclarations = $document->getStyleDeclarations();
if (!empty($styleDeclarations)) {
$responce['styleDeclarations'] = $styleDeclarations;
}
$styleSheets = $document->getStyleSheets();
if (!empty($styleSheets)) {
$responce['styleSheets'] = $styleSheets;
}
return $responce;
}
示例2: render
public function render()
{
$cssUrl = OW::getPluginManager()->getPlugin('FBCONNECT')->getStaticCssUrl() . 'fbconnect.css';
OW::getDocument()->addStyleSheet($cssUrl);
FBCONNECT_BOL_Service::getInstance()->initializeJs();
return parent::render();
}
示例3: render
public function render()
{
$defaultAvatarUrl = BOL_AvatarService::getInstance()->getDefaultAvatarUrl();
$this->assign('defaultAvatarUrl', $defaultAvatarUrl);
$js = "OW.Mailbox.conversationController = new MAILBOX_ConversationView();";
OW::getDocument()->addOnloadScript($js, 3006);
//TODO check this config
$enableAttachments = OW::getConfig()->getValue('mailbox', 'enable_attachments');
$this->assign('enableAttachments', $enableAttachments);
$replyToMessageActionPromotedText = '';
$isAuthorizedReplyToMessage = OW::getUser()->isAuthorized('mailbox', 'reply_to_message');
$isAuthorizedReplyToMessage = $isAuthorizedReplyToMessage || OW::getUser()->isAuthorized('mailbox', 'send_chat_message');
if (!$isAuthorizedReplyToMessage) {
$status = BOL_AuthorizationService::getInstance()->getActionStatus('mailbox', 'reply_to_message');
if ($status['status'] == BOL_AuthorizationService::STATUS_PROMOTED) {
$replyToMessageActionPromotedText = $status['msg'];
}
}
$this->assign('isAuthorizedReplyToMessage', $isAuthorizedReplyToMessage);
$isAuthorizedReplyToChatMessage = OW::getUser()->isAuthorized('mailbox', 'reply_to_chat_message');
if (!$isAuthorizedReplyToChatMessage) {
$status = BOL_AuthorizationService::getInstance()->getActionStatus('mailbox', 'reply_to_chat_message');
if ($status['status'] == BOL_AuthorizationService::STATUS_PROMOTED) {
$replyToMessageActionPromotedText = $status['msg'];
}
}
$this->assign('isAuthorizedReplyToChatMessage', $isAuthorizedReplyToChatMessage);
$this->assign('replyToMessageActionPromotedText', $replyToMessageActionPromotedText);
if ($isAuthorizedReplyToMessage) {
$text = new WysiwygTextarea('mailbox_message');
$text->setId('conversationTextarea');
$this->assign('mailbox_message', $text->renderInput());
}
return parent::render();
}
示例4: render
public function render()
{
$cssUrl = OW::getPluginManager()->getPlugin('FBCONNECT')->getStaticCssUrl() . 'fbconnect.css';
OW::getDocument()->addStyleSheet($cssUrl);
FBCONNECT_BOL_Service::getInstance()->initializeJs(array('email', 'user_about_me', 'user_birthday'), $_GET);
return parent::render();
}
示例5: render
public function render()
{
if (empty($this->sortItems)) {
$this->setVisible(false);
}
$this->assign('itemList', $this->sortItems);
return parent::render();
}
示例6: render
public function render()
{
if ($this->oembed["type"] == "video" && !empty($this->oembed["html"])) {
$this->initJs();
}
$this->assign('data', $this->oembed);
return parent::render();
}
示例7: render
public function render()
{
// init
$iLimit = OW::getConfig()->getValue('ynsocialconnect', 'limit_providers_view_on_login_header');
$iLimitSelected = OW::getConfig()->getValue('ynsocialconnect', 'limit_providers_view_on_login_header');
// process
//$aOpenProviders = YNSOCIALCONNECT_BOL_ServicesService::getInstance() -> getEnabledProviders($iLimit, (int)$iLimitSelected);
$aOpenProviders = YNSOCIALCONNECT_BOL_ServicesService::getInstance()->getProvidersByStatus($bDisplay = true);
$listProvider = array();
$step = 0;
foreach ($aOpenProviders as $item) {
if (in_array($item->name, array('facebook', 'twitter', 'linkedin'))) {
if (!YNSOCIALCONNECT_CLASS_SocialConnect::getInstance()->checkSocialBridgePlugin($item->name)) {
continue;
}
}
$listProvider[] = $item;
$step++;
if ($step >= $iLimit) {
break;
}
}
$iIconSize = intval(OW::getConfig()->getValue('ynsocialconnect', 'size_of_provider_icon_px')) >= 0 ? intval(OW::getConfig()->getValue('ynsocialconnect', 'size_of_provider_icon_px')) : 24;
$iWidth = (count($listProvider) + 1) * ($iIconSize + 6);
$this->assign('iLimitView', $iLimit);
$this->assign('iLimitSelected', $iLimitSelected);
$this->assign('aOpenProviders', $listProvider);
$this->assign('iIconSize', $iIconSize);
$this->assign('iWidth', $iWidth);
$this->assign('sCoreUrl', OW_DIR_ROOT);
$this->assign('sImgSrc', OW::getPluginManager()->getPlugin('ynsocialconnect')->getStaticUrl() . 'img/');
// set url redirect to session
$uri = OW::getRequest()->getRequestUri();
// @formatter:off
if (isset($uri) && strpos($uri, 'socialbridge') === false && strpos($uri, 'ynsocialbridge') === false && strpos($uri, 'ynsocialconnect') === false && strpos($uri, 'socialconnect') === false) {
$uri = OW_URL_HOME . $uri;
$_SESSION['ynsc_session']['urlRedirect'] = $uri;
}
// @formatter:on
if (OW::getSession()->isKeySet(YNSOCIALCONNECT_CTRL_Sync::SESSION_SIGNUP_DATA)) {
$signupData = OW::getSession()->get(YNSOCIALCONNECT_CTRL_Sync::SESSION_SIGNUP_DATA);
$profilePicture = YNSOCIALCONNECT_CLASS_SocialConnect::getInstance()->getPhotoUrlFromTokenData($signupData['user'], $signupData['service']);
if ($profilePicture == null) {
//OW::getSession() -> set(self::SESSION_USE_PROFILE_PHOTO, 'not_use');
$profilePicture = "";
} else {
//OW::getSession() -> set(self::SESSION_USE_PROFILE_PHOTO, 'use');
$url = OW::getRouter()->urlFor('YNSOCIALCONNECT_CTRL_Sync', 'removeAvatar');
$removeEl = "<div class=\"ow_avatar_change\"><a href=\"javascript:void(0);\" onclick=\"YNSocialConnect.removeAvatar(\\'{$url}\\');\" class=\"ow_lbutton\">X</a></div>";
//$removeEl = "<div class=\"ow_avatar_change\"><a href=\"javascript:void(0);\" onclick=\"YNSocialConnect.removeAvatar();\" class=\"ow_lbutton\">X</a></div>";
$profilePicture = "<div id=\"ynsc_profile_picture\" class=\"ynsc_profile_photo_center\"><img class=\"ynsc_profile_phpto\" src=\"" . $profilePicture . "\">" . $removeEl . "</div><br />";
}
$this->assign('profilePicture', $profilePicture);
}
// end
return parent::render();
}
示例8: render
public function render()
{
$tplTabs = array();
foreach ($this->tabs as $item) {
$tplTabs[] = array('label' => $item['label'], 'content' => $item['cmp']->render(), 'icon' => $item['icon'], 'active' => false);
}
$tplTabs[0]['active'] = true;
$this->assign('tabs', $tplTabs);
return parent::render();
}
示例9: render
public function render()
{
$tplComponentList = array();
foreach ($this->componentList as $item) {
$position = $this->positionList[$item['uniqName']];
$tplComponentList[$position['order']] = $item;
}
ksort($tplComponentList);
$this->assign('componentList', $tplComponentList);
return parent::render();
}
示例10: render
public function render()
{
$userId = OW::getUser()->getId();
$userSettingsForm = MAILBOX_BOL_ConversationService::getInstance()->getUserSettingsForm();
$this->addForm($userSettingsForm);
$userSettingsForm->getElement('user_id')->setValue($userId);
$friendsEnabled = (bool) OW::getEventManager()->call('plugin.friends');
$this->assign('friendsEnabled', $friendsEnabled);
$showAllMembersModeEnabled = (bool) OW::getConfig()->getValue('mailbox', 'show_all_members');
$this->assign('showAllMembersModeEnabled', $showAllMembersModeEnabled);
return parent::render();
}
示例11: getTxt
private function getTxt()
{
$template = OW::getPluginManager()->getPlugin('matchmaking')->getCmpViewDir() . 'notification_txt.html';
$this->setTemplate($template);
$this->assign('nl', self::NL_PLACEHOLDER);
$this->assign('tab', self::TAB_PLACEHOLDER);
$this->assign('space', self::SPACE_PLACEHOLDER);
$content = parent::render();
$search = array(self::NL_PLACEHOLDER, self::TAB_PLACEHOLDER, self::SPACE_PLACEHOLDER);
$replace = array("\n", ' ', ' ');
return str_replace($search, $replace, $content);
}
示例12: render
public function render()
{
// init
$iLimit = OW::getConfig()->getValue('ynsocialconnect', 'limit_providers_view_on_login_header');
$iLimitSelected = OW::getConfig()->getValue('ynsocialconnect', 'limit_providers_view_on_login_header');
// process
//$aOpenProviders = YNSOCIALCONNECT_BOL_ServicesService::getInstance() -> getEnabledProviders($iLimit, (int)$iLimitSelected);
$aOpenProviders = YNSOCIALCONNECT_BOL_ServicesService::getInstance()->getProvidersByStatus($bDisplay = true);
$listProvider = array();
$step = 0;
foreach ($aOpenProviders as $item) {
if (in_array($item->name, array('facebook', 'twitter', 'linkedin'))) {
if (!YNSOCIALCONNECT_CLASS_SocialConnect::getInstance()->checkSocialBridgePlugin($item->name)) {
continue;
}
}
$listProvider[] = $item;
$step++;
if ($step >= $iLimit) {
break;
}
}
$iIconSize = intval(OW::getConfig()->getValue('ynsocialconnect', 'size_of_provider_icon_px')) >= 0 ? intval(OW::getConfig()->getValue('ynsocialconnect', 'size_of_provider_icon_px')) : 24;
$iWidth = (count($listProvider) + 1) * ($iIconSize + 6);
$this->assign('iLimitView', $iLimit);
$this->assign('iLimitSelected', $iLimitSelected);
$this->assign('aOpenProviders', $listProvider);
$this->assign('iIconSize', $iIconSize);
$this->assign('iWidth', $iWidth);
$this->assign('sCoreUrl', OW_DIR_ROOT);
$this->assign('sImgSrc', OW::getPluginManager()->getPlugin('ynsocialconnect')->getStaticUrl() . 'img/');
if (YNSOCIALCONNECT_CLASS_Helper::getInstance()->getIsViewMore() == '0') {
$staticUrl = OW::getPluginManager()->getPlugin('ynsocialconnect')->getStaticUrl();
$document = OW::getDocument();
$document->addScript($staticUrl . 'js/ynsocialconnect.js');
$this->assign('isShowViewMore', '1');
$this->addComponent('eicmp', new YNSOCIALCONNECT_CMP_ViewMore());
}
// set url redirect to session
$uri = OW::getRequest()->getRequestUri();
// @formatter:off
if (isset($uri) && strpos($uri, 'socialbridge') === false && strpos($uri, 'ynsocialbridge') === false && strpos($uri, 'ynsocialconnect') === false && strpos($uri, 'socialconnect') === false) {
$uri = OW_URL_HOME . $uri;
$_SESSION['ynsc_session']['urlRedirect'] = $uri;
}
// @formatter:ofn
// end
return parent::render();
}
示例13: render
public function render()
{
if ($this->getTemplate() === null) {
try {
$plugin = OW::getPluginManager()->getPlugin(OW::getAutoloader()->getPluginKey(get_class($this)));
} catch (InvalidArgumentException $e) {
$plugin = null;
}
if ($plugin !== null) {
$template = OW::getAutoloader()->classToFilename(get_class($this), false);
$this->setTemplate($plugin->getMobileCmpViewDir() . $template . '.html');
}
}
return parent::render();
}
示例14: render
public function render()
{
if (!count($this->actions)) {
$this->setVisible(false);
} else {
$visible = true;
foreach ($this->actions as &$action) {
if (empty($action['subactions']) && !$action['action']->getLabel()) {
$visible = false;
break;
}
if (!empty($action['subactions'])) {
usort($action['subactions'], array($this, 'sortActionsCallback'));
}
}
$this->setVisible($visible);
}
usort($this->actions, array($this, 'sortParentActionsCallback'));
$this->assign('actions', $this->actions);
$this->assign('position', $this->position);
$this->setVisible(true);
return parent::render();
}
示例15: render
public function render()
{
$this->assign("images", $this->images);
$this->assign("url", $this->url);
$this->assign("label", $this->label);
$this->assign("iconClass", $this->iconClass);
$autoDisplayType = count($this->images);
$autoDisplayType = $autoDisplayType > 4 ? 4 : $autoDisplayType;
$this->assign("displayType", $this->displayType !== null ? $this->displayType : $autoDisplayType);
return parent::render();
}