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


PHP CComponentEngine::makePathFromTemplate方法代码示例

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


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

示例1: getStorageBaseUrl

 /**
  * Gets url which use for building url to listing folders, trashcan, etc.
  * @return string
  */
 public function getStorageBaseUrl()
 {
     if (!empty($this->unserializedMiscData['BASE_URL'])) {
         return '/' . ltrim(\CComponentEngine::makePathFromTemplate($this->unserializedMiscData['BASE_URL']), '/');
     }
     return '/common/' . $this->entityId . '/files/';
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:11,代码来源:common.php

示例2: getDataToShow

 public function getDataToShow()
 {
     $event = \CCalendarEvent::getById($this->entityId);
     if (empty($event)) {
         return array();
     }
     $members = array();
     if ($event['IS_MEETING']) {
         if (is_array($event['~ATTENDEES'])) {
             foreach ($event['~ATTENDEES'] as $user) {
                 $members[] = array("NAME" => $user['DISPLAY_NAME'], "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $user['USER_ID'])), 'AVATAR_SRC' => $user['AVATAR'], "IS_EXTRANET" => "N");
             }
         }
     } else {
         $by = "id";
         $order = "asc";
         $userRow = \CUser::getList($by, $order, array("ID_EQUAL_EXACT" => $event['CREATED_BY'], "ACTIVE" => "Y"), array("SELECT" => array('ID', 'NAME', 'LAST_NAME', 'LOGIN', 'PERSONAL_PHOTO')))->fetch();
         if ($userRow) {
             $name = trim($userRow['NAME'] . ' ' . $userRow['LAST_NAME']);
             if ($name == '') {
                 $name = trim($userRow['LOGIN']);
             }
             $members[] = array("NAME" => $name, "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $event['CREATED_BY'])), 'AVATAR_SRC' => Ui\Avatar::getPerson($userRow['PERSONAL_PHOTO']), "IS_EXTRANET" => "N");
         }
     }
     return array('TITLE' => Loc::getMessage('DISK_UF_CAL_EVENT_CONNECTOR_TITLE') . ": " . $event['NAME'], 'DETAIL_URL' => null, 'DESCRIPTION' => Ui\Text::killTags($event['DESCRIPTION']), 'MEMBERS' => $members);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:27,代码来源:calendareventconnector.php

示例3: getGridData

 private function getGridData($gridId)
 {
     $grid = array('ID' => $gridId);
     $securityContext = $this->storage->getCurrentUserSecurityContext();
     $parameters = array('with' => array('FILE', 'CREATE_USER'), 'filter' => array('IS_EXPIRED' => false, 'OBJECT.STORAGE_ID' => $this->storage->getId(), 'CREATED_BY' => $this->getUser()->getId()));
     $parameters = Driver::getInstance()->getRightsManager()->addRightsCheck($securityContext, $parameters, array('OBJECT_ID', 'OBJECT.CREATED_BY'));
     $items = ExternalLink::getModelList($parameters);
     Collection::sortByColumn($items, array('CREATE_TIME' => array(SORT_NUMERIC, SORT_ASC)));
     $urlManager = Driver::getInstance()->getUrlManager();
     $rows = array();
     foreach ($items as $externalLink) {
         /** @var ExternalLink $externalLink */
         $exportData = $externalLink->toArray();
         $nameSpecialChars = htmlspecialcharsbx($externalLink->getFile()->getName());
         $createDateText = htmlspecialcharsbx((string) $externalLink->getCreateTime());
         $columnName = "\n\t\t\t\t<table class=\"bx-disk-object-name\"><tr>\n\t\t\t\t\t\t<td style=\"width: 45px;\"><div data-object-id=\"{$externalLink->getId()}\" class=\"draggable bx-file-icon-container-small bx-disk-file-icon\"></div></td>\n\t\t\t\t\t\t<td><a class=\"bx-disk-folder-title\" id=\"disk_obj_{$externalLink->getId()}\" href=\"\" data-bx-dateModify=\"{$createDateText}\">{$nameSpecialChars}</a></td>\n\t\t\t\t</tr></table>\n\t\t\t";
         $createdByLink = \CComponentEngine::makePathFromTemplate($this->arParams['PATH_TO_USER'], array("user_id" => $externalLink->getCreatedBy()));
         $rows[] = array('data' => $exportData, 'columns' => array('CREATE_TIME' => formatDate('x', $externalLink->getCreateTime()->getTimestamp(), time() + CTimeZone::getOffset()), 'UPDATE_TIME' => formatDate('x', $externalLink->getCreateTime()->getTimestamp(), time() + CTimeZone::getOffset()), 'NAME' => $columnName, 'FORMATTED_SIZE' => CFile::formatSize($externalLink->getFile()->getSize()), 'CREATE_USER' => "\n\t\t\t\t\t\t<div class=\"bx-disk-user-link\"><a target='_blank' href=\"{$createdByLink}\" id=\"\">" . htmlspecialcharsbx($externalLink->getCreateUser()->getFormattedName()) . "</a></div>\n\t\t\t\t\t"), 'actions' => array(array("PSEUDO_NAME" => "download", "DEFAULT" => true, "ICONCLASS" => "download", "TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DOWNLOAD'), "ONCLICK" => "jsUtils.Redirect(arguments, '" . $urlManager->getUrlForDownloadFile($externalLink->getFile()) . "')"), array("PSEUDO_NAME" => "disable_external_link", "ICONCLASS" => "disable_external_link", "TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DISABLE_EXTERNAL_LINK'), "SHORT_TEXT" => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_ACT_DISABLE_EXTERNAL_LINK_SHORT'), "ONCLICK" => "BX.Disk['ExternalLinkListClass_{$this->getComponentId()}'].disableExternalLink({$externalLink->getId()}, {$externalLink->getObjectId()})")));
     }
     unset($externalLink);
     $grid['MODE'] = 'list';
     $grid['HEADERS'] = array(array('id' => 'ID', 'name' => 'ID', 'default' => false, 'show_checkbox' => true), array('id' => 'NAME', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_NAME'), 'default' => true), array('id' => 'CREATE_TIME', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_CREATE_TIME'), 'default' => true), array('id' => 'CREATE_USER', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_CREATE_USER'), 'default' => false), array('id' => 'FORMATTED_SIZE', 'name' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_COLUMN_FORMATTED_SIZE'), 'default' => true));
     $grid['ROWS'] = $rows;
     $grid['ROWS_COUNT'] = count($rows);
     $grid['FOOTER'] = array();
     return $grid;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:27,代码来源:class.php

示例4: getDestinations

 protected function getDestinations()
 {
     if ($this->taskPostData === null) {
         return array();
     }
     $members = array();
     if (!empty($this->taskPostData['RESPONSIBLE_ID'])) {
         $members[] = array("NAME" => \CUser::formatName('#NAME# #LAST_NAME#', array('NAME' => $this->taskPostData['RESPONSIBLE_NAME'], 'LAST_NAME' => $this->taskPostData['RESPONSIBLE_LAST_NAME'], 'SECOND_NAME' => $this->taskPostData['RESPONSIBLE_SECOND_NAME'], 'ID' => $this->taskPostData['RESPONSIBLE_ID'], 'LOGIN' => $this->taskPostData['RESPONSIBLE_LOGIN']), true, false), "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $this->taskPostData['RESPONSIBLE_ID'])), 'AVATAR_SRC' => Ui\Avatar::getPerson($this->taskPostData['RESPONSIBLE_PHOTO']), "IS_EXTRANET" => "N");
     }
     if (!empty($this->taskPostData['CREATED_BY'])) {
         $members[] = array("NAME" => \CUser::formatName('#NAME# #LAST_NAME#', array('NAME' => $this->taskPostData['CREATED_BY_NAME'], 'LAST_NAME' => $this->taskPostData['CREATED_BY_LAST_NAME'], 'SECOND_NAME' => $this->taskPostData['CREATED_BY_SECOND_NAME'], 'ID' => $this->taskPostData['CREATED_BY'], 'LOGIN' => $this->taskPostData['CREATED_BY_LOGIN']), true, false), "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $this->taskPostData['CREATED_BY'])), 'AVATAR_SRC' => Ui\Avatar::getPerson($this->taskPostData['CREATED_BY_PHOTO']), "IS_EXTRANET" => "N");
     }
     return $members;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:14,代码来源:taskconnector.php

示例5: while

// page count
$arResult['PAGER_PARAM'] = "PAGEN_{$arResult['PAGE_NAVNUM']}";
$arResult['PAGE_NEXT_NUMBER'] = $arResult['PAGE_NUMBER'] + 1;
while ($item = $dbRes->Fetch()) {
    $itemID = intval($item['ID']);
    $ownerID = intval($item['OWNER_ID']);
    $ownerTypeID = intval($item['OWNER_TYPE_ID']);
    CCrmMobileHelper::PrepareActivityItem($item, $arParams, array('ENABLE_COMMUNICATIONS' => false));
    $arResult['ITEMS'][] =& $item;
    unset($item);
}
if ($arResult['PAGE_NEXT_NUMBER'] > $arResult['PAGE_NAVCOUNT']) {
    $arResult['NEXT_PAGE_URL'] = '';
} else {
    $arResult['NEXT_PAGE_URL'] = $APPLICATION->GetCurPageParam('AJAX_CALL=Y&PAGING=Y&FORMAT=json&' . $arResult['PAGER_PARAM'] . '=' . $arResult['PAGE_NEXT_NUMBER'], array('AJAX_CALL', 'PAGING', 'FORMAT', 'SEARCH', $arResult['PAGER_PARAM']));
}
$arResult['SEARCH_PAGE_URL'] = $APPLICATION->GetCurPageParam('AJAX_CALL=Y&SEARCH=Y&FORMAT=json&apply_filter=Y&save=Y', array('AJAX_CALL', 'SEARCH', 'FORMAT', 'save', 'apply_filter', 'clear_filter'));
$arResult['SERVICE_URL'] = SITE_DIR . 'bitrix/components/bitrix/mobile.crm.activity.list/ajax.php?siteID=' . SITE_ID . '&' . bitrix_sessid_get();
$arResult['IS_FILTERED'] = !empty($filter);
$arResult['CREATE_CALL_URL'] = $arParams['ACTIVITY_CREATE_URL_TEMPLATE'] !== '' ? CComponentEngine::makePathFromTemplate($arParams['ACTIVITY_CREATE_URL_TEMPLATE'], array('owner_type' => $entityTypeName, 'owner_id' => $entityID, 'type_id' => CCrmActivityType::Call)) : '';
$arResult['CREATE_MEETING_URL'] = $arParams['ACTIVITY_CREATE_URL_TEMPLATE'] !== '' ? CComponentEngine::makePathFromTemplate($arParams['ACTIVITY_CREATE_URL_TEMPLATE'], array('owner_type' => $entityTypeName, 'owner_id' => $entityID, 'type_id' => CCrmActivityType::Meeting)) : '';
$arResult['CREATE_EMAIL_URL'] = $arParams['ACTIVITY_CREATE_URL_TEMPLATE'] !== '' ? CComponentEngine::makePathFromTemplate($arParams['ACTIVITY_CREATE_URL_TEMPLATE'], array('owner_type' => $entityTypeName, 'owner_id' => $entityID, 'type_id' => CCrmActivityType::Email)) : '';
$arResult['RELOAD_URL'] = $APPLICATION->GetCurPageParam('AJAX_CALL=Y&FORMAT=json', array('AJAX_CALL', 'SEARCH', 'FORMAT', 'save', 'apply_filter', 'clear_filter'));
//Require any update permission
$arResult['PERMISSIONS'] = array('CREATE' => CCrmLead::CheckUpdatePermission(0, $userPerms) || CCrmCompany::CheckUpdatePermission(0, $userPerms) || CCrmContact::CheckUpdatePermission(0, $userPerms) || CCrmDeal::CheckUpdatePermission(0, $userPerms));
$format = isset($_REQUEST['FORMAT']) ? strtolower($_REQUEST['FORMAT']) : '';
// Only JSON format is supported
if ($format !== '' && $format !== 'json') {
    $format = '';
}
$this->IncludeComponentTemplate($format);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例6: processActionDefault

 protected function processActionDefault()
 {
     $driver = \Bitrix\Disk\Driver::getInstance();
     $this->arResult['BUTTONS'] = array();
     $securityContext = $this->storage->getCurrentUserSecurityContext();
     /** @var Folder $folder */
     $folder = $this->getFolder();
     if (!$folder) {
         $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_FOLDER_TOOLBAR_ERROR_COULD_NOT_FIND_OBJECT'), self::ERROR_COULD_NOT_FIND_OBJECT)));
         $this->includeComponentTemplate();
     }
     $this->arResult['CLOUD_DOCUMENT'] = array();
     if ($this->isFolderList() && $folder->canAdd($securityContext)) {
         $this->arResult['BUTTONS'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_UPLOAD_FILE_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_UPLOAD_FILE_TITLE'), 'LINK' => "javascript:void(0);", 'ICON' => 'element-upload');
         if (\Bitrix\Disk\Configuration::canCreateFileByCloud()) {
             $documentHandlerName = $documentHandlerCode = null;
             $documentServiceCode = \Bitrix\Disk\UserConfiguration::getDocumentServiceCode();
             if (!$documentServiceCode) {
                 $documentServiceCode = 'l';
             }
             if (LocalDocumentController::isLocalService($documentServiceCode)) {
                 $documentHandlerName = LocalDocumentController::getName();
                 $documentHandlerCode = LocalDocumentController::getCode();
             } else {
                 $defaultDocumentHandler = \Bitrix\Disk\Driver::getInstance()->getDocumentHandlersManager()->getDefaultServiceForCurrentUser();
                 if ($defaultDocumentHandler) {
                     $documentHandlerName = $defaultDocumentHandler->getName();
                     $documentHandlerCode = $defaultDocumentHandler->getCode();
                 }
             }
             if ($documentHandlerCode) {
                 $urlManager = $driver->getUrlManager();
                 $this->arResult['CLOUD_DOCUMENT'] = array('DEFAULT_SERVICE' => $documentHandlerCode, 'DEFAULT_SERVICE_LABEL' => $documentHandlerName, 'CREATE_BLANK_FILE_URL' => $urlManager->getUrlToStartCreateUfFileByService('docx', $documentHandlerCode), 'RENAME_BLANK_FILE_URL' => $urlManager->getUrlDocumentController('rename', array('document_action' => 'rename')));
                 $this->arResult['BUTTONS'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_CREATE_DOC_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_CREATE_DOC_TITLE'), 'LINK' => "javascript:BX.Disk['FolderToolbarClass_{$this->getComponentId()}'].createFile();", 'ICON' => 'docs-add');
             }
         }
         $this->arResult['BUTTONS'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_CREATE_FOLDER_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_CREATE_FOLDER_TITLE'), 'LINK' => $this->extendedAddFolder ? "javascript:BX.Disk['FolderToolbarClass_{$this->getComponentId()}'].createExtendedFolder();" : "javascript:BX.Disk['FolderToolbarClass_{$this->getComponentId()}'].createFolder();", 'ICON' => 'folder-add');
     }
     if ($this->isTrashCan() && $folder->canRestore($securityContext)) {
         if (!empty($this->arParams['URL_TO_EMPTY_TRASHCAN'])) {
             $this->arResult['BUTTONS'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EMPTY_TRASHCAN_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EMPTY_TRASHCAN_TITLE'), 'LINK' => "javascript:BX.Disk['FolderToolbarClass_{$this->getComponentId()}'].emptyTrashCan();", 'ICON' => 'empty-trashcan');
         }
     }
     $this->arResult['DROPDOWN_FILTER'] = array();
     if (!empty($this->arParams['URL_TO_FOLDER_LIST'])) {
         $this->arResult['DROPDOWN_FILTER'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_FOLDER_LIST_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_FOLDER_LIST_TITLE'), 'HREF' => $this->arParams['URL_TO_FOLDER_LIST']);
         if ($this->isFolderList()) {
             $this->arResult['DROPDOWN_FILTER_CURRENT_LABEL'] = Loc::getMessage('DISK_FOLDER_TOOLBAR_FOLDER_LIST_TEXT');
             if ($this->arParams['RELATIVE_PATH'] && $folder->getId() != $this->storage->getRootObjectId()) {
                 $relativePath = explode('/', trim($this->arParams['RELATIVE_PATH'], '/'));
                 array_pop($relativePath);
                 if ($relativePath) {
                     $prevPageListing = rtrim(CComponentEngine::makePathFromTemplate($this->arParams['PATH_TO_FOLDER_LIST'], array('PATH' => implode('/', $relativePath))), '/');
                 } else {
                     $prevPageListing = $this->arParams['URL_TO_FOLDER_LIST'];
                 }
                 array_unshift($this->arResult['BUTTONS'], array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TITLE'), 'LINK' => $prevPageListing, 'ICON' => 'back'));
             }
         }
     }
     if (!empty($this->arParams['PATH_TO_EXTERNAL_LINK_LIST'])) {
         $this->arResult['DROPDOWN_FILTER'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_TEXT_2'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_TITLE'), 'HREF' => $this->arParams['PATH_TO_EXTERNAL_LINK_LIST']);
         if ($this->isExternalLinkList()) {
             $this->arResult['DROPDOWN_FILTER_CURRENT_LABEL'] = Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_TEXT_2');
             $this->arResult['BUTTONS'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TITLE'), 'LINK' => $this->arParams['URL_TO_FOLDER_LIST'], 'ICON' => 'back');
         }
     }
     if (!empty($this->arParams['URL_TO_TRASHCAN_LIST'])) {
         $this->arResult['DROPDOWN_FILTER'][] = array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_TRASHCAN_TEXT_2'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_TRASHCAN_TITLE'), 'HREF' => $this->arParams['URL_TO_TRASHCAN_LIST']);
         if ($this->isTrashCan()) {
             $this->arResult['DROPDOWN_FILTER_CURRENT_LABEL'] = Loc::getMessage('DISK_FOLDER_TOOLBAR_TRASHCAN_TEXT');
             array_unshift($this->arResult['BUTTONS'], array('TEXT' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TEXT'), 'TITLE' => Loc::getMessage('DISK_FOLDER_TOOLBAR_EXTERNAL_LINK_LIST_GO_BACK_TITLE'), 'LINK' => $this->arParams['URL_TO_FOLDER_LIST'], 'ICON' => 'back'));
         }
     }
     $this->includeComponentTemplate();
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:76,代码来源:class.php

示例7: array

        break;
    default:
        $bannerName = 'disk_banner2_' . Loc::getDefaultLang(LANGUAGE_ID) . '.png';
        break;
}
$pageId = "user_files";
include "util_menu.php";
include "util_profile.php";
?>
<div class="bx-disk-container posr" id="bx-disk-container">
	<table style="width: 100%;" cellpadding="0" cellspacing="0">
		<tr>
			<td>
				<div class="bx-disk-interface-toolbar-container">
					<?php 
$APPLICATION->IncludeComponent('bitrix:disk.folder.toolbar', '', array('STORAGE' => $arResult['VARIABLES']['STORAGE'], 'FOLDER' => $folder, 'URL_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('TRASH_PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'URL_TO_FOLDER_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_EXTERNAL_LINK_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_EXTERNAL_LINK_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_LIST' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FILE_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'RELATIVE_PATH' => $arResult['VARIABLES']['RELATIVE_PATH'], 'RELATIVE_ITEMS' => $arResult['VARIABLES']['RELATIVE_ITEMS'], 'TYPE' => 'list'), $component);
?>
				</div>
				<?php 
$APPLICATION->IncludeComponent('bitrix:disk.folder.list', '', array_merge($arResult, array('STORAGE' => $arResult['VARIABLES']['STORAGE'], 'PATH_TO_FOLDER_LIST' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FILE_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'FOLDER' => $folder, 'RELATIVE_PATH' => $arResult['VARIABLES']['RELATIVE_PATH'], 'RELATIVE_ITEMS' => $arResult['VARIABLES']['RELATIVE_ITEMS'])), $component);
?>
			</td>
			<td class="bx-disk-table-sidebar-cell" style="">
				<div id="bx_disk_empty_select_section" class="bx-disk-sidebar-section">
					<div class="bx-disk-info-panel">
						<div class="bx-disk-info-panel-relative tac">
							<div class="bx-disk-info-panel-icon-empty"><br></div>
							<div class="bx-disk-info-panel-empty-text">
								<?php 
echo Loc::getMessage('DISK_VIEW_SMALL_DETAIL_SIDEBAR');
?>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:user_disk.php

示例8: array

    CCrmMobileHelper::PrepareCompanyItem($arFields, $arParams, array('COMPANY_TYPE' => $arResult['COMPANY_TYPE'], 'INDUSTRY' => $arResult['INDUSTRY'], 'EMPLOYEES_LIST' => $arResult['EMPLOYEES']));
}
$arResult['ENTITY'] = $arFields;
$sid = bitrix_sessid();
$serviceURLTemplate = $arParams["SERVICE_URL_TEMPLATE"] ? $arParams["SERVICE_URL_TEMPLATE"] : '#SITE_DIR#bitrix/components/bitrix/mobile.crm.company.edit/ajax.php?site_id=#SITE#&sessid=#SID#';
$arResult['SERVICE_URL'] = CComponentEngine::makePathFromTemplate($serviceURLTemplate, array('SID' => $sid));
$arResult['UPLOAD_URL'] = CCrmUrlUtil::ToAbsoluteUrl(CComponentEngine::makePathFromTemplate('#SITE_DIR#mobile/crm/company/file.php?id=#ID#&sessid=#SID#', array('SID' => $sid, 'ID' => $entityID)));
// CONTEXT_ID -->
$contextID = isset($arParams['CONTEXT_ID']) ? $arParams['CONTEXT_ID'] : '';
if ($contextID === '' && isset($_REQUEST['context_id'])) {
    $contextID = $_REQUEST['context_id'];
}
if ($contextID === '') {
    $contextID = "{$uid}_{$entityID}";
}
$arResult['CONTEXT_ID'] = $arParams['CONTEXT_ID'] = $contextID;
//<-- CONTEXT_ID
// ENABLE_CONTACT -->
if (isset($arParams['ENABLE_CONTACT'])) {
    $arResult['ENABLE_CONTACT'] = (bool) $arParams['ENABLE_CONTACT'];
} else {
    $arResult['ENABLE_CONTACT'] = !isset($_REQUEST['enable_contact']) || $_REQUEST['enable_contact'] !== 'N';
}
if ($arResult['ENABLE_CONTACT'] && $arResult['MODE'] !== 'CREATE') {
    $arResult['ENABLE_CONTACT'] = false;
}
//<-- ENABLE_CONTACT
$arResult['COMPANY_TYPE_SELECTOR_URL'] = CComponentEngine::makePathFromTemplate($arParams['STATUS_SELECTOR_URL_TEMPLATE'], array('type_id' => 'COMPANY_TYPE', 'context_id' => $contextID));
$arResult['COMPANY_INDUSTRY_SELECTOR_URL'] = CComponentEngine::makePathFromTemplate($arParams['STATUS_SELECTOR_URL_TEMPLATE'], array('type_id' => 'INDUSTRY', 'context_id' => $contextID));
$arResult['CONTACT_SELECTOR_URL'] = CComponentEngine::makePathFromTemplate($arParams['CONTACT_SELECTOR_URL_TEMPLATE'], array('context_id' => $contextID));
$this->IncludeComponentTemplate();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例9: array_map

/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>

<?php 
if ($arParams["USE_RSS"] == "Y") {
    ?>
	<?php 
    $rss_url = CComponentEngine::makePathFromTemplate($arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["rss_section"], array_map("urlencode", $arResult["VARIABLES"]));
    if (method_exists($APPLICATION, 'addheadstring')) {
        $APPLICATION->AddHeadString('<link rel="alternate" type="application/rss+xml" title="' . $rss_url . '" href="' . $rss_url . '" />');
    }
    ?>
	<a href="<?php 
    echo $rss_url;
    ?>
" title="rss" target="_self"><img alt="RSS" src="<?php 
    echo $templateFolder;
    ?>
/images/gif-light/feed-icon-16x16.gif" border="0" align="right" /></a>
<?php 
}
?>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:30,代码来源:section.php

示例10: IsModuleInstalled

}
CAjax::Init();
CUtil::InitJSCore(array('window'));
$GLOBALS['APPLICATION']->AddHeadScript('/bitrix/js/main/utils.js');
/********************************************************************
				Input params
********************************************************************/
$arParams["USE_SEARCH"] = $arParams["USE_SEARCH"] == "Y" && IsModuleInstalled("search") ? "Y" : "N";
$arParams["SHOW_WEBDAV"] = $arParams["SHOW_WEBDAV"] == "N" ? "N" : "Y";
$res = strtolower($_SERVER["HTTP_USER_AGENT"]);
$bIsIE = strpos($res, "opera") === false && strpos($res, "msie") !== false;
$bIsFF = strpos($res, "firefox") !== false;
$ob = $arParams['OBJECT'];
$bInTrash = $ob->meta_state == 'TRASH';
$pathToUser = !empty($arParams["USER_VIEW_URL"]) ? rtrim($arParams["USER_VIEW_URL"], '/') . '/files/lib/' : '/company/personal/user/#user_id#/files/lib/';
$pathToUser = \CComponentEngine::makePathFromTemplate($pathToUser, array('user_id' => $GLOBALS['USER']->getId(), 'USER_ID' => $GLOBALS['USER']->getId()));
/********************************************************************
				/Input params
********************************************************************/
$bBitrix24Tpl = function_exists('BX24ShowPanel');
$arButtons = array();
$arSubButtons = $arFixedSubButtons = array();
if (strpos($arParams["PAGE_NAME"], "WEBDAV_BIZPROC_WORKFLOW") !== false) {
    if ($arParams["USE_BIZPROC"] == "Y" && $ob->CheckRight($arParams["PERMISSION"], 'element_edit') >= "W" && IsModuleInstalled("bizprocdesigner")) {
        $arButtons[] = array("TEXT" => GetMessage("BPATT_HELP1"), "TITLE" => GetMessage("BPATT_HELP1_TEXT"), "LINK" => $arResult["URL"]["WEBDAV_BIZPROC_WORKFLOW_EDIT"] . (strpos($arResult["URL"]["WEBDAV_BIZPROC_WORKFLOW_EDIT"], "?") === false ? "?" : "&") . "init=statemachine", "ICON" => "btn-list");
        $arButtons[] = array("TEXT" => GetMessage("BPATT_HELP2"), "TITLE" => GetMessage("BPATT_HELP2_TEXT"), "LINK" => $arResult["URL"]["WEBDAV_BIZPROC_WORKFLOW_EDIT"] . (strpos($arResult["URL"]["WEBDAV_BIZPROC_WORKFLOW_EDIT"], "?") === false ? "?" : ""), "ICON" => "btn-list");
    }
} elseif ($arParams["PAGE_NAME"] == "SECTIONS") {
    $cannotReadSection = $ob->e_rights && !$ob->GetPermission('SECTION', $ob->arParams['item_id'], 'section_read');
    $cannotEditSection = $ob->e_rights && !$ob->GetPermission('SECTION', $ob->arParams['item_id'], 'section_edit');
    if ($ob->CheckRight($arParams["PERMISSION"], 'section_element_bind') >= "U" && !($arParams["OBJECT"]->workflow == 'workflow' && !$arParams["OBJECT"]->permission_wf_edit)) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例11: sendNotify

 public static function sendNotify(array $folderInvite)
 {
     $serverName = (CMain::IsHTTPS() ? "https" : "http") . "://" . (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0 ? SITE_SERVER_NAME : COption::GetOptionString("main", "server_name", ""));
     if (empty($folderInvite['IS_DELETED']) && !empty($folderInvite['IS_APPROVED']) && $folderInvite['USER_ID'] != $folderInvite['INVITE_USER_ID'] && \Bitrix\Main\Loader::includeModule('im')) {
         $sectionToShare = CIBlockSection::getList(array(), array('ID' => $folderInvite['SECTION_ID'], 'IBLOCK_ID' => $folderInvite['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N'), false, array('NAME'))->fetch();
         if (empty($sectionToShare['NAME'])) {
             return;
         }
         $notifyFields = array();
         $notifyFields['NOTIFY_MODULE'] = 'webdav';
         $notifyFields['NOTIFY_EVENT'] = "invite";
         $notifyFields['NOTIFY_TYPE'] = IM_NOTIFY_FROM;
         $notifyFields['FROM_USER_ID'] = $folderInvite['USER_ID'];
         $notifyFields['TO_USER_ID'] = $folderInvite['INVITE_USER_ID'];
         $notifyFields['NOTIFY_TAG'] = \Bitrix\Webdav\FolderInviteTable::getNotifyTag($folderInvite);
         $notifyFields['NOTIFY_SUB_TAG'] = "WEBDAV|INVITE|{$folderInvite['ID']}";
         $uriShow = \CComponentEngine::makePathFromTemplate(CWebDavSymlinkHelper::getPathPattern('user', '/company/personal/user/#user_id#/'), array('user_id' => $folderInvite['INVITE_USER_ID'])) . 'files/lib/?result=sec' . $folderInvite['LINK_SECTION_ID'];
         $uriDisconnect = \CComponentEngine::makePathFromTemplate(CWebDavSymlinkHelper::getPathPattern('user', '/company/personal/user/#user_id#/'), array('user_id' => $folderInvite['INVITE_USER_ID'])) . 'files/lib/?result=sec' . $folderInvite['LINK_SECTION_ID'] . '#disconnect';
         $notifyFields['NOTIFY_MESSAGE'] = GetMessage('WD_SYMLINK_INVITE_TEXT_APPROVE_N1', array('#FOLDERNAME#' => '<a href="' . $uriShow . '">' . $sectionToShare['NAME'] . '</a>', '#DISCONNECT_LINK#' => '<a href="' . $uriDisconnect . '">' . GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_LINK') . '</a>', '#INVITETEXT#' => $folderInvite['DESCRIPTION'] ?: ''));
         $notifyFields['NOTIFY_MESSAGE_OUT'] = GetMessage('WD_SYMLINK_INVITE_TEXT_APPROVE_N1', array('#FOLDERNAME#' => $sectionToShare['NAME'] . " ({$uriShow})", '#DISCONNECT_LINK#' => "\n\n" . GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_LINK') . ': ' . $serverName . $uriDisconnect, '#INVITETEXT#' => $folderInvite['DESCRIPTION'] ?: ''));
         \CIMNotify::Add($notifyFields);
     } elseif (empty($folderInvite['IS_DELETED']) && $folderInvite['USER_ID'] == $folderInvite['INVITE_USER_ID'] && \Bitrix\Main\Loader::includeModule('im')) {
         $sectionToShare = CIBlockSection::getList(array(), array('ID' => $folderInvite['SECTION_ID'], 'IBLOCK_ID' => $folderInvite['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N'), false, array('NAME', 'SOCNET_GROUP_ID'))->fetch();
         if (empty($sectionToShare['NAME']) || empty($sectionToShare['SOCNET_GROUP_ID'])) {
             return;
         }
         if (\Bitrix\Main\Loader::includeModule('socialnetwork')) {
             $group = CSocNetGroup::GetList(array(), array('ID' => $sectionToShare['SOCNET_GROUP_ID']), false, false, array('NAME'))->fetch();
         }
         $notifyFields = array();
         $notifyFields['NOTIFY_MODULE'] = 'webdav';
         $notifyFields['NOTIFY_EVENT'] = "invite";
         $notifyFields['NOTIFY_TYPE'] = IM_NOTIFY_FROM;
         $notifyFields['FROM_USER_ID'] = $folderInvite['USER_ID'];
         $notifyFields['TO_USER_ID'] = $folderInvite['INVITE_USER_ID'];
         $notifyFields['NOTIFY_TAG'] = \Bitrix\Webdav\FolderInviteTable::getNotifyTag($folderInvite);
         $notifyFields['NOTIFY_SUB_TAG'] = "WEBDAV|INVITE|{$folderInvite['ID']}";
         $uriShow = \CComponentEngine::makePathFromTemplate(CWebDavSymlinkHelper::getPathPattern('group', '/company/personal/user/#user_id#/'), array('user_id' => $folderInvite['INVITE_USER_ID'])) . 'files/lib/?result=sec' . $folderInvite['LINK_SECTION_ID'];
         $uriDisconnect = \CComponentEngine::makePathFromTemplate(CWebDavSymlinkHelper::getPathPattern('user', '/company/personal/user/#user_id#/'), array('user_id' => $folderInvite['INVITE_USER_ID'])) . 'files/lib/?result=sec' . $folderInvite['LINK_SECTION_ID'] . '#disconnect';
         if (\CWebDavTools::allowAutoconnectShareGroupFolder()) {
             $notifyFields['NOTIFY_MESSAGE'] = GetMessage('WD_SYMLINK_INVITE_GROUP_TEXT_APPROVE_N1', array('#FOLDERNAME#' => $sectionToShare['NAME'], '#INVITETEXT#' => $folderInvite['DESCRIPTION'] ?: '', '#GROUPNAME#' => '<a href="' . $uriShow . '">' . $group['NAME'] . '</a>', '#DISCONNECT_LINK#' => '<a href="' . $uriDisconnect . '">' . GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_LINK') . '</a>'));
             $notifyFields['NOTIFY_MESSAGE_OUT'] = GetMessage('WD_SYMLINK_INVITE_GROUP_TEXT_APPROVE_N1', array('#FOLDERNAME#' => $sectionToShare['NAME'], '#INVITETEXT#' => $folderInvite['DESCRIPTION'] ?: '', '#GROUPNAME#' => $group['NAME'], '#DISCONNECT_LINK#' => "\n\n" . GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_LINK') . ': ' . $serverName . $uriDisconnect));
         } elseif (empty($folderInvite['IS_APPROVED'])) {
             $notifyFields['NOTIFY_TYPE'] = IM_NOTIFY_CONFIRM;
             $notifyFields['NOTIFY_BUTTONS'] = array(array('TITLE' => GetMessage('WD_SYMLINK_INVITE_APPROVE_Y'), 'VALUE' => 'Y', 'TYPE' => 'accept'), array('TITLE' => GetMessage('WD_SYMLINK_INVITE_APPROVE_N'), 'VALUE' => 'N', 'TYPE' => 'cancel'));
             $notifyFields['MESSAGE'] = GetMessage('WD_SYMLINK_INVITE_GROUP_TEXT_APPROVE_CONFIRM_N1', array('#FOLDERNAME#' => $sectionToShare['NAME'], '#GROUPNAME#' => $group['NAME']));
         }
         \CIMNotify::Add($notifyFields);
     } elseif (!empty($folderInvite['IS_DELETED']) && \Bitrix\Main\Loader::includeModule('im')) {
         $sectionToShare = CIBlockSection::getList(array(), array('ID' => $folderInvite['SECTION_ID'], 'IBLOCK_ID' => $folderInvite['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N'), false, array('NAME'))->fetch();
         if (empty($sectionToShare['NAME'])) {
             return;
         }
         $inviteUser = \CUser::getById($folderInvite['INVITE_USER_ID']);
         if ($inviteUser) {
             $inviteUser = $inviteUser->fetch();
         }
         $notifyFields = array();
         $notifyFields['NOTIFY_MODULE'] = 'webdav';
         $notifyFields['NOTIFY_EVENT'] = "invite";
         $notifyFields['NOTIFY_TYPE'] = IM_NOTIFY_FROM;
         $notifyFields['FROM_USER_ID'] = $folderInvite['INVITE_USER_ID'];
         $notifyFields['TO_USER_ID'] = $folderInvite['USER_ID'];
         $notifyFields['NOTIFY_TAG'] = \Bitrix\Webdav\FolderInviteTable::getNotifyTag($folderInvite);
         $notifyFields['NOTIFY_SUB_TAG'] = "WEBDAV|INVITE|{$folderInvite['ID']}";
         if (CWebDavTools::getUserGender($inviteUser['PERSONAL_GENDER']) == 'F') {
             $notifyFields['MESSAGE'] = GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_F', array('#FOLDERNAME#' => $sectionToShare['NAME'], '#USERNAME#' => CWebDavTools::getUserName($inviteUser)));
         } else {
             $notifyFields['MESSAGE'] = GetMessage('WD_SYMLINK_INVITE_TEXT_DISCONNECT_M', array('#FOLDERNAME#' => $sectionToShare['NAME'], '#USERNAME#' => CWebDavTools::getUserName($inviteUser)));
         }
         \CIMNotify::Add($notifyFields);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:73,代码来源:symlinkhelper.php

示例12: array

 $arLead['MODIFY_BY_FORMATTED_NAME'] = CUser::FormatName($arParams['NAME_TEMPLATE'], array('LOGIN' => $arLead['~MODIFY_BY_LOGIN'], 'NAME' => $arLead['~MODIFY_BY_NAME'], 'SECOND_NAME' => $arLead['~MODIFY_BY_SECOND_NAME'], 'LAST_NAME' => $arLead['~MODIFY_BY_LAST_NAME']), true, false);
 $sourceID = isset($arLead['~SOURCE_ID']) ? $arLead['~SOURCE_ID'] : '';
 $arLead['LEAD_SOURCE_NAME'] = $sourceID !== '' ? isset($arResult['SOURCE_LIST'][$sourceID]) ? $arResult['SOURCE_LIST'][$sourceID] : $sourceID : '';
 $arLead['~LEAD_SOURCE_NAME'] = htmlspecialcharsback($arLead['~LEAD_SOURCE_NAME']);
 $arLead['~LEAD_FORMATTED_NAME'] = CUser::FormatName(\Bitrix\Crm\Format\PersonNameFormatter::getFormat(), array('LOGIN' => '', 'NAME' => isset($arLead['~NAME']) ? $arLead['~NAME'] : '', 'SECOND_NAME' => isset($arLead['~SECOND_NAME']) ? $arLead['~SECOND_NAME'] : '', 'LAST_NAME' => isset($arLead['~LAST_NAME']) ? $arLead['~LAST_NAME'] : ''), false, false);
 $arLead['LEAD_FORMATTED_NAME'] = htmlspecialcharsbx($arLead['~LEAD_FORMATTED_NAME']);
 if (isset($arLead['~ACTIVITY_TIME'])) {
     $time = MakeTimeStamp($arLead['ACTIVITY_TIME']);
     $arLead['~ACTIVITY_EXPIRED'] = $time <= $now;
     $arLead['~ACTIVITY_IS_CURRENT_DAY'] = $arLead['~ACTIVITY_EXPIRED'] || CCrmActivity::IsCurrentDay($time);
 }
 if ($arResult['ENABLE_TASK']) {
     $arLead['PATH_TO_TASK_EDIT'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate(COption::GetOptionString('tasks', 'paths_task_user_edit', ''), array('task_id' => 0, 'user_id' => $userID)), array('UF_CRM_TASK' => 'L_' . $arLead['ID'], 'TITLE' => urlencode(GetMessage('CRM_TASK_TITLE_PREFIX')), 'TAGS' => urlencode(GetMessage('CRM_TASK_TAG')), 'back_url' => urlencode($arParams['PATH_TO_LEAD_LIST'])));
 }
 if (IsModuleInstalled('sale')) {
     $arLead['PATH_TO_QUOTE_ADD'] = CHTTP::urlAddParams(CComponentEngine::makePathFromTemplate($arParams['PATH_TO_QUOTE_EDIT'], array('quote_id' => 0)), array('lead_id' => $arLead['ID']));
 }
 if ($arResult['ENABLE_BIZPROC']) {
     $arLead['BIZPROC_STATUS'] = '';
     $arLead['BIZPROC_STATUS_HINT'] = '';
     $arDocumentStates = CBPDocument::GetDocumentStates(array('crm', 'CCrmDocumentLead', 'LEAD'), array('crm', 'CCrmDocumentLead', 'LEAD_' . $arLead['ID']));
     $arLead['PATH_TO_BIZPROC_LIST'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LEAD_SHOW'], array('lead_id' => $arLead['ID'])), array('CRM_LEAD_SHOW_V12_active_tab' => 'tab_bizproc'));
     $totalTaskQty = 0;
     $docStatesQty = count($arDocumentStates);
     if ($docStatesQty === 1) {
         $arDocState = $arDocumentStates[array_shift(array_keys($arDocumentStates))];
         $docTemplateID = $arDocState['TEMPLATE_ID'];
         $paramName = "BIZPROC_{$docTemplateID}";
         $docTtl = isset($arDocState['STATE_TITLE']) ? $arDocState['STATE_TITLE'] : '';
         $docName = isset($arDocState['STATE_NAME']) ? $arDocState['STATE_NAME'] : '';
         $docTemplateName = isset($arDocState['TEMPLATE_NAME']) ? $arDocState['TEMPLATE_NAME'] : '';
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例13: array

$pageId = "user_files";
include "util_menu.php";
include "util_profile.php";
?>

<div class="bx-disk-container posr">
	<table style="width: 100%;" cellpadding="0" cellspacing="0">
		<tr>
			<td>
				<div class="bx-disk-interface-toolbar-container">
					<?php 
$APPLICATION->IncludeComponent('bitrix:disk.folder.toolbar', '', array('STORAGE' => $arResult['VARIABLES']['STORAGE'], 'FOLDER_ID' => $arResult['VARIABLES']['FOLDER_ID'], 'MODE' => 'trashcan', 'URL_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('TRASH_PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'URL_TO_FOLDER_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_EXTERNAL_LINK_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_EXTERNAL_LINK_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_LIST' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FILE_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'URL_TO_EMPTY_TRASHCAN' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('PATH' => '')), 'TYPE' => 'list'), $component);
?>
					</div>
					<?php 
$APPLICATION->IncludeComponent('bitrix:disk.trashcan', '', array_merge($arResult, array('STORAGE' => $arResult['VARIABLES']['STORAGE'], 'URL_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('TRASH_PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'URL_TO_FOLDER_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('PATH' => '', 'user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_EXTERNAL_LINK_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_EXTERNAL_LINK_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_LIST' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FOLDER_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_FILE_VIEW' => CComponentEngine::MakePathFromTemplate($arResult['PATH_TO_USER_DISK_FILE'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_TRASHCAN_LIST' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_LIST'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'PATH_TO_TRASHCAN_FILE_VIEW' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_TRASHCAN_FILE_VIEW'], array('user_id' => $arResult['VARIABLES']['user_id'])), 'URL_TO_EMPTY_TRASHCAN' => CComponentEngine::makePathFromTemplate($arResult['PATH_TO_USER_DISK'], array('PATH' => '')), 'FOLDER_ID' => $arResult['VARIABLES']['FOLDER_ID'], 'RELATIVE_PATH' => $arResult['VARIABLES']['RELATIVE_PATH'], 'RELATIVE_ITEMS' => $arResult['VARIABLES']['RELATIVE_ITEMS'])), $component);
?>
				</td>
				<td class="bx-disk-table-sidebar-cell" style="">
					<div id="bx_disk_empty_select_section" class="bx-disk-sidebar-section">
						<div class="bx-disk-info-panel">
							<div class="bx-disk-info-panel-relative tac">
								<div class="bx-disk-info-panel-icon-empty"><br></div>
									<div class="bx-disk-info-panel-empty-text">
										<?php 
echo Loc::getMessage('DISK_VIEW_SMALL_DETAIL_SIDEBAR');
?>
									</div>
							</div>
						</div>
					</div>
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:user_trashcan_list.php

示例14: getBizProcData

 protected function getBizProcData(BaseObject $object, SecurityContext $securityContext, array $actions, array $columnsBizProc, array $bizprocIcon, array $exportData)
 {
     $documentData = array('DISK' => array('DOCUMENT_TYPE' => \Bitrix\Disk\BizProcDocument::generateDocumentComplexType($this->storage->getId()), 'DOCUMENT_ID' => \Bitrix\Disk\BizProcDocument::getDocumentComplexId($object->getId())), 'WEBDAV' => array('DOCUMENT_TYPE' => \Bitrix\Disk\BizProcDocumentCompatible::generateDocumentComplexType($this->storage->getId()), 'DOCUMENT_ID' => \Bitrix\Disk\BizProcDocumentCompatible::getDocumentComplexId($object->getId())));
     $listBpTemplates = array();
     foreach ($this->arParams['TEMPLATE_BIZPROC'] as $idTemplate => $valueTemplate) {
         $url = CComponentEngine::MakePathFromTemplate($valueTemplate['URL'], array("ELEMENT_ID" => $object->getId()));
         $listBpTemplates[] = array("ICONCLASS" => "", "TEXT" => $valueTemplate['NAME'], "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($url) . "');");
     }
     if ($object->canStartBizProc($securityContext) && !empty($listBpTemplates)) {
         $actions[] = array("ICONCLASS" => "bizproc_start", "TEXT" => Loc::getMessage("DISK_FOLDER_LIST_ACT_START_BIZPROC"), "MENU" => $listBpTemplates);
     }
     $webdavFileId = $object->getXmlId();
     if (!empty($webdavFileId)) {
         if (Loader::includeModule("iblock")) {
             if ($this->storage->getProxyType() instanceof ProxyType\Group) {
                 $iblock = CIBlockElement::getList(array(), array("ID" => $webdavFileId, 'SHOW_NEW' => 'Y'), false, false, array('ID', 'IBLOCK_ID'))->fetch();
                 $entity = 'CIBlockDocumentWebdavSocnet';
             } else {
                 $iblock = CIBlockElement::getList(array(), array("ID" => $webdavFileId, 'SHOW_NEW' => 'Y'), false, false, array('ID', 'IBLOCK_ID'))->fetch();
                 $entity = 'CIBlockDocumentWebdav';
             }
             if (!empty($iblock)) {
                 $documentData['OLD_FILE'] = array('DOCUMENT_TYPE' => array('webdav', $entity, "iblock_" . $iblock['IBLOCK_ID']), 'DOCUMENT_ID' => array('webdav', $entity, $iblock['ID']));
             }
         }
     }
     foreach ($documentData as $nameModuleId => $data) {
         $temporary[$nameModuleId] = CBPDocument::getDocumentStates($data['DOCUMENT_TYPE'], $data['DOCUMENT_ID']);
     }
     if (isset($temporary['OLD_FILE'])) {
         $documentStates = array_merge($temporary['DISK'], $temporary['WEBDAV'], $temporary['OLD_FILE']);
     } else {
         $documentStates = array_merge($temporary['DISK'], $temporary['WEBDAV']);
     }
     foreach ($documentStates as $key => $documentState) {
         if (empty($documentState['ID'])) {
             unset($documentStates[$key]);
         }
     }
     $columnsBizProc['BIZPROC'] = "";
     $bizprocIcon['BIZPROC'] = "";
     if (!empty($documentStates)) {
         if (count($documentStates) == 1) {
             $documentState = reset($documentStates);
             if ($documentState['WORKFLOW_STATUS'] > 0 || empty($documentState['WORKFLOW_STATUS'])) {
                 $tasksWorkflow = CBPDocument::getUserTasksForWorkflow($this->getUser()->GetID(), $documentState["ID"]);
                 $columnsBizProc["BIZPROC"] = '<div class="bizproc-item-title">' . htmlspecialcharsbx($documentState["TEMPLATE_NAME"]) . ': ' . '<span class="bizproc-item-title bizproc-state-title" style="">' . '<a href="' . $exportData["OPEN_URL"] . '#tab-bp">' . (strlen($documentState["STATE_TITLE"]) > 0 ? htmlspecialcharsbx($documentState["STATE_TITLE"]) : htmlspecialcharsbx($documentState["STATE_NAME"])) . '</a>' . '</span>' . '</div>';
                 $columnsBizProc['BIZPROC'] = str_replace("'", "\"", $columnsBizProc['BIZPROC']);
                 $bizprocIcon["BIZPROC"] = "<div class=\"element-bizproc-status bizproc-statuses " . (!(strlen($documentState["ID"]) <= 0 || strlen($documentState["WORKFLOW_STATUS"]) <= 0) ? 'bizproc-status-' . (empty($tasksWorkflow) ? "inprogress" : "attention") : '') . "\" onmouseover='BX.hint(this, \"" . addslashes($columnsBizProc["BIZPROC"]) . "\")'></div>";
                 if (!empty($tasksWorkflow)) {
                     $tmp = array();
                     foreach ($tasksWorkflow as $val) {
                         $url = CComponentEngine::makePathFromTemplate($this->arParams["PATH_TO_DISK_TASK"], array("ID" => $val["ID"]));
                         $url .= "?back_url=" . urlencode($this->getApplication()->getCurPageParam());
                         $tmp[] = '<a href="' . $url . '">' . $val["NAME"] . '</a>';
                     }
                     $columnsBizProc["BIZPROC"] .= '<div class="bizproc-tasks">' . implode(", ", $tmp) . '</div>';
                     return array($actions, $columnsBizProc, $bizprocIcon);
                 }
                 return array($actions, $columnsBizProc, $bizprocIcon);
             }
             return array($actions, $columnsBizProc, $bizprocIcon);
         } else {
             $tasks = array();
             $inprogress = false;
             foreach ($documentStates as $key => $documentState) {
                 if ($documentState['WORKFLOW_STATUS'] > 0 || empty($documentState['WORKFLOW_STATUS'])) {
                     $tasksWorkflow = CBPDocument::getUserTasksForWorkflow($this->getUser()->GetID(), $documentState["ID"]);
                     if (!$inprogress) {
                         $inprogress = strlen($documentState['ID']) > 0 && strlen($documentState['WORKFLOW_STATUS']) > 0;
                     }
                     if (!empty($tasksWorkflow)) {
                         foreach ($tasksWorkflow as $val) {
                             $tasks[] = $val;
                         }
                     }
                 }
             }
             $columnsBizProc["BIZPROC"] = '<span class="bizproc-item-title">' . Loc::getMessage("DISK_FOLDER_LIST_GRID_BIZPROC") . ': <a href="' . $exportData["OPEN_URL"] . '#tab-bp" title="' . Loc::getMessage("DISK_FOLDER_LIST_GRID_BIZPROC_TITLE") . '">' . count($documentStates) . '</a></span>' . (!empty($tasks) ? '<br /><span class="bizproc-item-title">' . Loc::getMessage("DISK_FOLDER_LIST_GRID_BIZPROC_TASKS") . ': <a href="' . $this->arParams["PATH_TO_DISK_TASK_LIST"] . '" title="' . Loc::getMessage("DISK_FOLDER_LIST_GRID_BIZPROC_TASKS_TITLE") . '">' . count($tasks) . '</a></span>' : '');
             $bizprocIcon["BIZPROC"] = "<div class=\"element-bizproc-status bizproc-statuses " . ($inprogress ? ' bizproc-status-' . (empty($tasks) ? "inprogress" : "attention") : '') . "\" onmouseover='BX.hint(this, \"" . addslashes($columnsBizProc['BIZPROC']) . "\")'></div>";
             return array($actions, $columnsBizProc, $bizprocIcon);
         }
     }
     return array($actions, $columnsBizProc, $bizprocIcon);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:85,代码来源:class.php

示例15: strpos

if (isset($_GET['set_filter'])) {
    if (substr($_SERVER['QUERY_STRING'], 0, 6) !== 'EXCEL=') {
        if ($_SERVER['QUERY_STRING'] !== $strReportViewParams) {
            CReport::setViewParams($arParams['REPORT_ID'], $this->GetTemplateName(), $_SERVER['QUERY_STRING']);
        }
    }
} else {
    if (!empty($strReportViewParams)) {
        if (!is_set($_GET['sort_id'])) {
            $len = strpos($arParams['PATH_TO_REPORT_VIEW'], '?');
            if ($len === false) {
                $redirectUrl = $arParams['PATH_TO_REPORT_VIEW'];
            } else {
                $redirectUrl = substr($arParams['PATH_TO_REPORT_VIEW'], 0, $len);
            }
            $redirectUrl = CComponentEngine::makePathFromTemplate($redirectUrl, array('report_id' => $arParams['REPORT_ID']));
            $redirectUrl .= '?' . $strReportViewParams;
            LocalRedirect($redirectUrl);
        } else {
            CReport::clearViewParams($arParams['REPORT_ID']);
        }
    }
}
try {
    // select report info/settings
    $report = array();
    $result = false;
    if (intval($arParams['REPORT_ID']) > 0) {
        $result = Bitrix\Report\ReportTable::getById($arParams['REPORT_ID']);
    }
    if (is_object($result)) {
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php


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