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


PHP Loc::GetMessage方法代码示例

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


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

示例1: sprintf

$tableId = 'tbl_user_vars_list';
$adminSort = new CAdminSorting($tableId, 'NAME', 'asc');
$adminList = new CAdminList($tableId, $adminSort);
$adminList->addHeaders($headers);
if ($request->getQuery('mode') != 'list') {
    $context = new CAdminContextMenu($contextMenu);
}
$queryBuilder = new Entity\Query(Model\VarsTable::getEntity());
$queryBuilder->setSelect(array('ID', 'NAME', 'CODE', 'DESCRIPTION', 'VALUE'))->setFilter(array('GROUP_ID' => $dataGroup['ID']));
$sortBy = $request->getQuery('by') ? strtoupper($request->getQuery('by')) : 'ID';
$sortOrder = $request->getQuery('order') ?: 'asc';
$queryBuilder->setOrder(array($sortBy => $sortOrder));
$resultData = new CAdminResult($queryBuilder->exec(), $tableId);
$resultData->navStart();
$adminList->navText($resultData->getNavPrint(Loc::getMessage('PAGES')));
while ($item = $resultData->fetch()) {
    $row = $adminList->addRow($item['ID'], $item);
    $actions = array();
    $actions[] = array('ICON' => 'edit', 'TEXT' => Loc::GetMessage('USER_VARS_ACTION_EDIT_VAR'), 'ACTION' => $adminList->actionRedirect('user_vars_edit.php?ID=' . $item['ID'] . '&GROUP_ID=' . $dataGroup['ID']));
    $actions[] = array('ICON' => 'delete', 'TEXT' => Loc::getMessage('USER_VARS_ACTION_DELETE_VAR'), 'ACTION' => "if(confirm('" . Loc::getMessage('USER_VARS_DELETE_VAR_CONFIRM') . "')) " . $adminList->actionRedirect('user_vars_edit.php?action=delete&ID=' . $item['ID'] . '&GROUP_ID=' . $dataGroup['ID'] . '&' . bitrix_sessid_get()));
    $row->addActions($actions);
}
$prologType = $request->getQuery('mode') == 'list' ? 'prolog_js' : 'prolog';
require sprintf('%s%s', getenv('DOCUMENT_ROOT'), $includePath[$prologType]);
if ($prologType != 'prolog_js') {
    $context->show();
}
$adminList->checkListMode();
$adminList->displayList();
$epilogType = $request->getQuery('mode') == 'list' ? 'epilog_js' : 'epilog';
require sprintf('%s%s', getenv('DOCUMENT_ROOT'), $includePath[$epilogType]);
开发者ID:ASDAFF,项目名称:citfact.uservars,代码行数:31,代码来源:user_vars_list.php

示例2: array

use Bitrix\Main\Localization\Loc;
use Citfact\UserVars;
use Citfact\UserVars\Model;
Loc::loadMessages(__FILE__);
Loc::loadMessages(__DIR__ . '/user_vars.php');
global $APPLICATION;
$application = Application::getInstance();
$applicationOld =& $APPLICATION;
$APPLICATION->setTitle(Loc::getMessage('USER_VARS_TITLE'));
if (!Loader::includeModule('citfact.uservars')) {
    $applicationOld->authForm(Loc::getMessage('ACCESS_DENIED'));
}
$request = $application->getContext()->getRequest();
$includePath = array('prolog' => '/bitrix/modules/main/include/prolog_admin_after.php', 'prolog_js' => '/bitrix/modules/main/include/prolog_admin_js.php', 'epilog' => '/bitrix/modules/main/include/epilog_admin.php', 'epilog_js' => '/bitrix/modules/main/include/epilog_admin_js.php');
$contextMenu[] = array('TEXT' => Loc::getMessage('USER_VARS_BACK_GROUP'), 'TITLE' => Loc::getMessage('USER_VARS_BACK_GROUP'), 'LINK' => 'user_vars.php?lang=' . LANGUAGE_ID, 'ICON' => 'btn_list');
$tabsStructur = array(array('DIV' => 'group', 'ICON' => 'main_user_edit', 'TAB' => Loc::GetMessage('USER_VARS_GROUP_NAME'), 'TITLE' => Loc::GetMessage('USER_VARS_GROUP_NAME')));
$submitTypeSave = $request->getPost('save') ? true : false;
$submitTypeApply = $request->getPost('apply') ? true : false;
$isOldGroup = false;
$isNewGroup = true;
if (array_key_exists('ID', $_REQUEST) && (int) $_REQUEST['ID'] > 0) {
    $varsGroup = new UserVars\VarsGroup();
    $dataGroup = $varsGroup->findOneById($_REQUEST['ID'])->fetch();
    if (!empty($dataGroup)) {
        $isOldGroup = true;
        $isNewGroup = false;
    }
} else {
    $dataGroup = array_fill_keys(array('ID', 'NAME', 'CODE'), '');
}
if ($isOldGroup && $request->getQuery('action') == 'delete' && check_bitrix_sessid()) {
开发者ID:ASDAFF,项目名称:citfact.uservars,代码行数:31,代码来源:user_vars_group_edit.php

示例3: executeMigrations

 public function executeMigrations($up = true)
 {
     foreach ($this->migrations as $mgr) {
         try {
             if ($up) {
                 $r = $mgr->executeUp();
             } else {
                 $r = $mgr->executeDown();
             }
         } catch (\Exception $e) {
             $this->addError($e->getMessage());
         }
         if (!$r) {
             $this->addError(Loc::GetMessage('MIGRATION_EXEC_FAIL', array('#MIG#' => $mgr->getCode())));
         } else {
             $mgr->setChangeDate(date('d.m.Y H:i:s'))->setStatus($up ? 'UP' : 'DOWN')->update();
         }
     }
     return $this->getErrors();
 }
开发者ID:u-mulder,项目名称:bixmigs,代码行数:20,代码来源:bxmg_dispatcher.php

示例4: htmlspecialcharsbx

" name="migration_folder" />
        </td>
    </tr>
    <tr>
        <td width="40%"><?php 
echo Loc::GetMessage('UM_BM_MIGRATION_FILENAME_REGEXP');
?>
:</td>
        <td width="60%">
<?php 
$val = Option::get(UM_BM_MODULE_NAME, 'migration_filename_regexp', Um\BixMigDispatcher::DEFAULT_FILENAME_PATTERN);
?>
            <input type="text" size="35" maxlength="128" value="<?php 
echo htmlspecialcharsbx($val);
?>
" name="migration_filename_regexp" />
        </td>
    </tr>
<?php 
$tabControl->Buttons();
?>
    <input type="submit" class="adm-btn-green" name="Update" value="<?php 
echo Loc::GetMessage('UM_BM_SAVE');
?>
" />
    <input type="hidden" name="Update" value="Y" />
<?php 
$tabControl->End();
?>
</form>
开发者ID:u-mulder,项目名称:bixmigs,代码行数:30,代码来源:options.php

示例5: while

} while ($arResult['nStartPage'] <= $arResult['nEndPage']);
if ($arResult['NavPageNomer'] < $arResult['NavPageCount']) {
    ?>

        |&nbsp;<a href="<?php 
    echo $arResult['NEXT_PAGE_LINK'];
    ?>
">&raquo;</a>&nbsp;|&nbsp;
        <a href="<?php 
    echo $arResult['END_PAGE_LINK'];
    ?>
"><?php 
    echo Loc::GetMessage("nav_end");
    ?>
</a>&nbsp;
    <?php 
}
if ($arResult['bShowAll']) {
    ?>
        <a class="nav-page-all" href="<?php 
    echo $arResult['SHOW_ALL_LINK'];
    ?>
"><?php 
    echo Loc::GetMessage("nav_all");
    ?>
</a>
    <?php 
}
?>
</div>
开发者ID:Varfann,项目名称:bx-features,代码行数:30,代码来源:template.php

示例6: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
use Bitrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);
$arComponentDescription = array("NAME" => Loc::GetMessage("CN_CUSTOM_FORM_NAME"), "DESCRIPTION" => Loc::GetMessage("CN_CUSTOM_FORM_DESC"), "ICON" => "/images/icon.png", "SORT" => 100, "CACHE_PATH" => "Y", 'COMPLEX' => 'N', "PATH" => array("ID" => "Codenails", "SORT" => 200, "NAME" => Loc::GetMessage("CODENAILS_COMPONENTS"), "CHILD" => array("ID" => "cn_custom", "NAME" => Loc::GetMessage("CN_CUSTOM"), "SORT" => 10)));
开发者ID:info-expert-projects,项目名称:BitrixCustomForm,代码行数:8,代码来源:.description.php

示例7: array

        }
    }
}
$arIBlocks = array();
if ($arCurrentValues["USE_IBLOCK"] == 'Y') {
    $db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
    while ($arRes = $db_iblock->Fetch()) {
        $arIBlocks[$arRes["ID"]] = $arRes["NAME"];
    }
}
$arSections = array();
if (intval($arCurrentValues["IBLOCK_ID"]) > 0) {
    $dbSect = CIBlockSection::GetList(array('left_margin' => 'asc'), array('IBLOCK_ID' => $arCurrentValues["IBLOCK_ID"]));
    while ($arSect = $dbSect->Fetch()) {
        $arSections[$arSect['ID']] = '[' . $arSect['ID'] . ']' . str_repeat('.', $arSect['DEPTH_LEVEL']) . ' ' . $arSect['NAME'];
    }
}
$arEvents = array();
if ($arCurrentValues["SEND_NOTIFICATION"] == 'Y') {
    $dbEvent = CEventType::GetList(array('LID' => SITE_ID), array('TYPE_ID' => 'ASC'));
    while ($arEvent = $dbEvent->Fetch()) {
        $arEvents[$arEvent['EVENT_NAME']] = $arEvent['NAME'];
    }
}
$arGroups = array();
$dbGroup = CGroup::GetList($by = "c_sort", $order = "desc");
while ($arGroup = $dbGroup->Fetch()) {
    $arGroups[$arGroup['ID']] = '[' . $arGroup['ID'] . '] ' . $arGroup['NAME'];
}
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("FORM_CODE" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_FORM_CODE_PARAM_TITLE"), "TYPE" => "STRING", "DEFAULT" => "custom"), "USE_IBLOCK" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_USE_IBLOCK_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '', "MULTIPLE" => "N", "REFRESH" => "Y"), "PARENT_SECTION_ID" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_PARENT_SECTION_ID_PARAM_TITLE"), "TYPE" => "LIST", "DEFAULT" => "0", "VALUES" => $arSections), "ACTIVE_ITEM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_ACTIVE_ITEM"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "AJAX_OPEN_FORM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_AJAX_OPEN_FORM_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ENABLE_FAKE_FORM" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_ENABLE_FAKE_FORM_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SEND_NOTIFICATION" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_SEND_NOTIFICATION_PARAM_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "EVENT_NAME" => array("PARENT" => "BASE", "NAME" => Loc::GetMessage("CN_EVENT_NAME_PARAM_TITLE"), "TYPE" => "LIST", "DEFAULT" => "", "VALUES" => $arEvents), "SHOW_FOR_USER_GROUPS" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_SHOW_FOR_USER_GROUPS_PARAM_TITLE"), "TYPE" => "LIST", "VALUES" => $arGroups, "DEFAULT" => '', "MULTIPLE" => "Y"), "ENABLE_FOR_USER_GROUPS" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_ENABLE_FOR_USER_GROUPS_PARAM_TITLE"), "TYPE" => "LIST", "VALUES" => $arGroups, "DEFAULT" => '', "MULTIPLE" => "Y"), "NOT_ENABLE_NOTE" => array("PARENT" => "ACCESS", "NAME" => Loc::GetMessage("CN_NOT_ENABLE_NOTE_PARAM_TITLE"), "TYPE" => "STRING", "ROWS" => 3, "DEFAULT" => ""), 'CACHE_TIME' => array()));
开发者ID:info-expert-projects,项目名称:BitrixCustomForm,代码行数:30,代码来源:.parameters.php


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