本文整理汇总了PHP中CBXFeatures::IsFeatureEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP CBXFeatures::IsFeatureEnabled方法的具体用法?PHP CBXFeatures::IsFeatureEnabled怎么用?PHP CBXFeatures::IsFeatureEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBXFeatures
的用法示例。
在下文中一共展示了CBXFeatures::IsFeatureEnabled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Add
/** Add new store in table b_catalog_store,
* @static
* @param $arFields
* @return bool|int
*/
static function Add($arFields)
{
/** @global CDataBase $DB */
global $DB;
if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
$dbResultList = CCatalogStore::GetList(array());
if ($arResult = $dbResultList->Fetch()) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE"));
return false;
}
}
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$arFields['~DATE_CREATE'] = $DB->GetNowFunction();
if (!self::CheckFields('ADD', $arFields)) {
return false;
}
$arInsert = $DB->PrepareInsert("b_catalog_store", $arFields);
$strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") " . "VALUES(" . $arInsert[1] . ")";
$res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__);
if (!$res) {
return false;
}
$lastId = intval($DB->LastID());
return $lastId;
}
示例2: SPRegisterUpdatedItem
public static function SPRegisterUpdatedItem($arFields)
{
if (CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) {
if (CIntranetSharepoint::$bUpdateInProgress) {
return;
}
$dbRes = CIntranetSharepoint::GetByID($arFields['IBLOCK_ID']);
if ($arRes = $dbRes->Fetch()) {
CIntranetSharepoint::AddToUpdateLog($arFields);
}
}
}
示例3: Add
/** Add new store in table b_catalog_store,
* @static
* @param $arFields
* @return bool|int
*/
static function Add($arFields)
{
/** @global CDataBase $DB */
global $DB;
if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
$dbResultList = CCatalogStore::GetList(array(), array(), false, array('NAV_PARAMS' => array("nTopCount" => "1")), array("ID"));
if ($arResult = $dbResultList->Fetch()) {
$GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE"));
return false;
}
}
foreach (GetModuleEvents("catalog", "OnBeforeCatalogStoreAdd", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array(&$arFields)) === false) {
return false;
}
}
if (array_key_exists('DATE_CREATE', $arFields)) {
unset($arFields['DATE_CREATE']);
}
if (array_key_exists('DATE_MODIFY', $arFields)) {
unset($arFields['DATE_MODIFY']);
}
$arFields['~DATE_MODIFY'] = $DB->GetNowFunction();
$arFields['~DATE_CREATE'] = $DB->GetNowFunction();
if (!self::CheckFields('ADD', $arFields)) {
return false;
}
$arInsert = $DB->PrepareInsert("b_catalog_store", $arFields);
$strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") VALUES(" . $arInsert[1] . ")";
$res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__);
if (!$res) {
return false;
}
$lastId = intval($DB->LastID());
foreach (GetModuleEvents("catalog", "OnCatalogStoreAdd", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($lastId, $arFields));
}
return $lastId;
}
示例4:
if ($gadget["COMPANY_PHOTO_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyPhoto")) {
continue;
}
if ($gadget["COMPANY_CALENDAR_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyCalendar")) {
continue;
}
if ($gadget["CALENDAR_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Calendar")) {
continue;
}
if ($gadget["COMPANY_VIDEO_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyVideo")) {
continue;
}
if ($gadget["WORKGROUPS_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Workgroups")) {
continue;
}
if ($gadget["FRIENDS_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Friends")) {
continue;
}
if ($USER->IsAuthorized() && $arResult["PERMISSION"] < "W" && $gadget["SELF_PROFILE_ONLY"] == true && $arParams["MODE"] == "SU" && intval($arParams["USER_ID"]) > 0 && $arParams["USER_ID"] != $USER->GetID()) {
continue;
}
if ($gadget["BLOG_ONLY"] == true && $gadget["SU_ONLY"] == true && intval($arParams["USER_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $arParams["USER_ID"], "blog")) {
continue;
}
if ($gadget["BLOG_ONLY"] == true && $gadget["SG_ONLY"] == true && intval($arParams["SOCNET_GROUP_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_GROUP, $arParams["SOCNET_GROUP_ID"], "blog")) {
continue;
}
if ($gadget["FORUM_ONLY"] == true && $gadget["SU_ONLY"] == true && intval($arParams["USER_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $arParams["USER_ID"], "forum")) {
continue;
}
if ($gadget["FORUM_ONLY"] == true && $gadget["SG_ONLY"] == true && intval($arParams["SOCNET_GROUP_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_GROUP, $arParams["SOCNET_GROUP_ID"], "forum")) {
示例5: array
?><a href="/bitrix/admin/event_log.php?lang=<? echo LANGUAGE_ID; ?>&set_filter=Y<? echo CCatalogEvent::GetYandexAgentFilter(); ?>"><? echo Loc::getMessage('CAT_AGENT_EVENT_LOG_SHOW_ERROR')?></a>
</td></tr>
<?
$systemTabControl->BeginNextTab();
?><tr><td align="left"><?
$firstTop = ' style="margin-top: 0;"';
if (!$useSaleDiscountOnly)
{
?>
<h4<? echo $firstTop; ?>><? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT'); ?></h4>
<input class="adm-btn-save" type="button" id="discount_reindex" value="<? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT_BTN'); ?>">
<p><? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT_ALERT'); ?></p><?
$firstTop = '';
}
if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && CCatalogProductSetAvailable::getAllCounter() > 0)
{
?><h4<? echo $firstTop; ?>><? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE'); ?></h4>
<input class="adm-btn-save" type="button" id="sets_reindex" value="<? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE_BTN'); ?>">
<p><? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE_ALERT'); ?></p><?
$firstTop = '';
}
?>
</td></tr><?
if ($strUseStoreControl === 'N' && !empty($arCatalogList))
{
$userListID = array();
$strQuantityUser = '';
$strQuantityReservedUser = '';
$strStoreUser = '';
$strClearQuantityDate = '';
示例6: GetMessage
<input type="hidden" name="CAT_ROW_COUNTER" id="CAT_ROW_COUNTER" value="<?php
echo $ind;
?>
">
<input type="button" value="<?php
echo GetMessage("C2IT_MORE");
?>
" OnClick="ClonePriceSections()">
</td>
</tr>
<script type="text/javascript">
arCatalogGroups = [];
catalogGroupsInd = 0;
</script>
<?php
if (CBXFeatures::IsFeatureEnabled('CatMultiPrice')) {
$dbCatalogGroups = CCatalogGroup::GetList(array("SORT" => "ASC", "NAME" => "ASC", "ID" => "ASC"), array("!BASE" => "Y"));
while ($arCatalogGroup = $dbCatalogGroups->Fetch()) {
?>
<script type="text/javascript">
arCatalogGroups[catalogGroupsInd] = <?php
echo $arCatalogGroup["ID"];
?>
;
catalogGroupsInd++;
</script>
<tr>
<td valign="top" align="right">
<?php
echo GetMessage("C2IT_PRICE_TYPE");
?>
示例7: array
$strUseStoreControl = '';
$strSaveWithoutPrice = '';
$boolCatalogRead = false;
$boolCatalogPrice = false;
$boolCatalogPurchasInfo = false;
$boolCatalogSet = false;
$arProductTypeList = array();
$showCatalogWithOffers = false;
if ($bCatalog)
{
$strUseStoreControl = COption::GetOptionString("catalog", "default_use_store_control");
$strSaveWithoutPrice = COption::GetOptionString('catalog','save_product_without_price','N');
$boolCatalogRead = $USER->CanDoOperation('catalog_read');
$boolCatalogPrice = $USER->CanDoOperation('catalog_price');
$boolCatalogPurchasInfo = $USER->CanDoOperation('catalog_purchas_info');
$boolCatalogSet = CBXFeatures::IsFeatureEnabled('CatCompleteSet');
$arCatalog = CCatalogSKU::GetInfoByIBlock($arIBlock["ID"]);
if (empty($arCatalog))
{
$bCatalog = false;
}
else
{
if (CCatalogSKU::TYPE_PRODUCT == $arCatalog['CATALOG_TYPE'] || CCatalogSKU::TYPE_FULL == $arCatalog['CATALOG_TYPE'])
{
if (CIBlockRights::UserHasRightTo($arCatalog['IBLOCK_ID'], $arCatalog['IBLOCK_ID'], "iblock_admin_display"))
{
$boolSKU = true;
$strSKUName = GetMessage('IBLIST_A_OFFERS');
}
}
示例8: array
if ($arResult["IBLOCK"]["BIZPROC"] == "Y" && $arParams["CAN_EDIT_BIZPROC"]) {
$arToolbar[] = array("TEXT" => GetMessage("CT_BLL_TOOLBAR_BIZPROC"), "TITLE" => GetMessage("CT_BLL_TOOLBAR_BIZPROC_TITLE"), "LINK" => $arResult["BIZPROC_WORKFLOW_ADMIN_URL"], "ICON" => "btn-list-bizproc");
}
if ($arParams["IBLOCK_TYPE_ID"] == COption::GetOptionString("lists", "livefeed_iblock_type_id")) {
$text = GetMessage("CT_BLL_TOOLBAR_PROCESS");
$title = GetMessage("CT_BLL_TOOLBAR_PROCESS_TITLE");
} else {
$text = GetMessage("CT_BLL_TOOLBAR_LIST");
$title = GetMessage("CT_BLL_TOOLBAR_LIST_TITLE");
}
$arToolbar[] = array("TEXT" => $text, "TITLE" => $title, "LINK" => $arResult["LIST_EDIT_URL"], "ICON" => "btn-edit-list");
}
if ($arResult["CAN_READ"]) {
$arToolbar[] = array("TEXT" => GetMessage("CT_BLL_EXPORT_EXCEL"), "TITLE" => GetMessage("CT_BLL_EXPORT_EXCEL_TITLE"), "LINK" => CHTTP::urlAddParams(strpos($APPLICATION->GetCurPageParam(), "?") == false ? $arResult["EXPORT_EXCEL_URL"] : $arResult["EXPORT_EXCEL_URL"] . substr($APPLICATION->GetCurPageParam(), strpos($APPLICATION->GetCurPageParam(), "?")), array("ncc" => "y")), "ICON" => "btn-list-excel");
}
if (IsModuleInstalled('intranet') && CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) {
if ($arIcons = $APPLICATION->IncludeComponent('bitrix:sharepoint.link', '', array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'OUTPUT' => 'N'), null, array('HIDE_ICONS' => 'Y'))) {
if (count($arIcons['LINKS']) > 0) {
$arMenu = array();
foreach ($arIcons['LINKS'] as $link) {
$arMenu[] = array('TEXT' => $link['TEXT'], 'ONCLICK' => $link['ONCLICK'], 'ICONCLASS' => $link['ICON']);
}
$arToolbar[] = array('TEXT' => 'SharePoint', 'ICON' => 'bx-sharepoint', 'MENU' => $arMenu);
}
}
}
if (count($arToolbar)) {
$APPLICATION->IncludeComponent("bitrix:main.interface.toolbar", "", array("BUTTONS" => $arToolbar), $component, array("HIDE_ICONS" => "Y"));
}
$arActions = array();
if (!empty($arResult["ELEMENTS_CAN_DELETE"])) {
示例9: GetFormatedUserName
function GetFormatedUserName($USER_ID, $bEnableId = true)
{
$result = "";
$USER_ID = IntVal($USER_ID);
if ($USER_ID > 0) {
if (!isset($LOCAL_PAYED_USER_CACHE[$USER_ID]) || !is_array($LOCAL_PAYED_USER_CACHE[$USER_ID])) {
$dbUser = CUser::GetByID($USER_ID);
if ($arUser = $dbUser->Fetch()) {
$LOCAL_PAYED_USER_CACHE[$USER_ID] = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arUser["NAME"], "LAST_NAME" => $arUser["LAST_NAME"], "SECOND_NAME" => $arUser["SECOND_NAME"], "LOGIN" => $arUser["LOGIN"]), true, true);
}
}
if ($bEnableId) {
$result .= '[<a href="/bitrix/admin/user_edit.php?ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">' . $USER_ID . '</a>] ';
}
if (CBXFeatures::IsFeatureEnabled('SaleAccounts')) {
$result .= '<a href="/bitrix/admin/sale_buyers_profile.php?USER_ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">';
} else {
$result .= '<a href="/bitrix/admin/user_edit.php?ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">';
}
$result .= $LOCAL_PAYED_USER_CACHE[$USER_ID];
$result .= '</a>';
}
return $result;
}
示例10: GetMessage
<a href="/bitrix/admin/settings.php?mid=catalog&lang=<?php
echo LANGUAGE_ID;
?>
"><?php
echo GetMessage("C2IT_NO_USER_GROUPS2");
?>
</a>.</td>
</tr>
<?php
}
?>
</table>
<br><b>1)</b> <?php
echo GetMessage("C2IT_ZERO_HINT");
}
if (CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
$tabControl1->BeginNextTab();
?>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="internal">
<tr class="heading">
<td><?php
echo GetMessage("C2IT_STORE_NUMBER");
?>
</td>
<td><?php
echo GetMessage("C2IT_NAME");
?>
</td>
<td><?php
echo GetMessage("C2IT_STORE_ADDR");
?>
示例11: IncludeModuleLangFile
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/intranet/public/workgroups/extranet/.left.menu_ext.php");
global $APPLICATION;
// You can change this url template
$strGroupSubjectLinkTemplate = COption::GetOptionString("socialnetwork", "subject_path_template", "/workgroups/group/search/#subject_id#/");
$strGroupLinkTemplate = COption::GetOptionString("socialnetwork", "group_path_template", "/workgroups/group/#group_id#/");
if (SITE_TEMPLATE_ID == "bitrix24") {
if (CModule::IncludeModule("extranet") && CBXFeatures::IsFeatureEnabled('Workgroups') && CBXFeatures::IsFeatureEnabled('Extranet')) {
global $USER;
$USER_ID = $USER->GetID();
$arExSGGroup = array();
if (CModule::IncludeModule("socialnetwork")) {
if (defined("BX_COMP_MANAGED_CACHE")) {
global $CACHE_MANAGER;
$CACHE_MANAGER->RegisterTag('sonet_user2group_U' . $USER_ID);
}
// get all groups from current site (if not extranet)
if (SITE_ID != CExtranet::GetExtranetSiteID()) {
$arGroupForCheck = array();
$dbGroups = CSocNetGroup::GetList(array(), array("SITE_ID" => SITE_ID), false, false, array('ID'));
while ($arGroups = $dbGroups->GetNext()) {
$arGroupForCheck[] = $arGroups["ID"];
}
}
if (!is_array($arGroupForCheck) || count($arGroupForCheck) > 0) {
$arGroupFilterMy = array("USER_ID" => $USER_ID, "<=ROLE" => SONET_ROLES_USER, "GROUP_ACTIVE" => "Y", "!GROUP_CLOSED" => "Y", "GROUP_SITE_ID" => CExtranet::GetExtranetSiteID());
if (count($arGroupForCheck) > 0) {
示例12: IsSocNet
public static function IsSocNet()
{
if (!isset(self::$bSocNet)) {
self::$bSocNet = class_exists('CSocNetUserToGroup') && CBXFeatures::IsFeatureEnabled("Calendar") && self::IsIntranetEnabled();
}
return self::$bSocNet;
}
示例13: array
$intSelected = 0;
}
$arResult['JS_OFFERS'] = $arMatrix;
$arResult['OFFERS_SELECTED'] = $intSelected;
if ($arMatrix[$intSelected]['SLIDER_COUNT'] > 0) {
$arResult['MORE_PHOTO'] = $arMatrix[$intSelected]['SLIDER'];
$arResult['MORE_PHOTO_COUNT'] = $arMatrix[$intSelected]['SLIDER_COUNT'];
}
$arResult['OFFERS_IBLOCK'] = $arSKU['IBLOCK_ID'];
}
if ($arResult['MODULES']['catalog'] && $arResult['CATALOG']) {
if ($arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT || $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_SET) {
CIBlockPriceTools::setRatioMinPrice($arResult, false);
$arResult['MIN_BASIS_PRICE'] = $arResult['MIN_PRICE'];
}
if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT) {
$rsSets = CCatalogProductSet::getList(array(), array('@OWNER_ID' => $arResult['ID'], '=SET_ID' => 0, '=TYPE' => CCatalogProductSet::TYPE_GROUP), false, false, array('ID', 'OWNER_ID'));
if ($arSet = $rsSets->Fetch()) {
$arResult['OFFER_GROUP'] = true;
}
}
}
if (!empty($arResult['DISPLAY_PROPERTIES'])) {
foreach ($arResult['DISPLAY_PROPERTIES'] as $propKey => $arDispProp) {
if ('F' == $arDispProp['PROPERTY_TYPE']) {
unset($arResult['DISPLAY_PROPERTIES'][$propKey]);
}
}
}
$arResult['SKU_PROPS'] = $arSKUPropList;
$arResult['DEFAULT_PICTURE'] = $arEmptyPreview;
示例14: class_exists
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("calendar")) {
return;
}
$adv_mode = $arCurrentValues["ADVANCED_MODE_SETTINGS"] == 'Y';
$eventListMode = $arCurrentValues["EVENT_LIST_MODE"] == 'Y';
$bSocNet = CModule::IncludeModule("socialnetwork");
if ($bSocNet) {
$bSocNet = class_exists('CSocNetUserToGroup') && CBXFeatures::IsFeatureEnabled("Calendar");
}
$arTypes = array();
$types = CCalendarType::GetList();
if (is_array($types)) {
foreach ($types as $type) {
$arTypes[$type["XML_ID"]] = "[" . $type["XML_ID"] . "] " . $type["NAME"];
}
}
// * * * * * * * * * * * * Groups * * * * * * * * * * * *
$arComponentParameters = array();
// $arComponentParameters["GROUPS"] = array(
// "BASE_SETTINGS" => array("NAME" => GetMessage("EC_GROUP_BASE_SETTINGS"), "SORT" => "100")
// );
//* * * * * * * * * * * Parameters * * * * * * * * * * *
$arParams = array();
$arParams["CALENDAR_TYPE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes);
if (CCalendar::IsIntranetEnabled()) {
$arParams["ALLOW_SUPERPOSE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_P_ALLOW_SUPERPOSE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y");
示例15: array
$asset->addString('<link rel="stylesheet" type="text/css" media="print" href="' . SITE_TEMPLATE_PATH . '/print.css" />', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS);
$asset->addString('<link rel="alternate stylesheet" type="text/css" media="screen,projection" href="' . SITE_TEMPLATE_PATH . '/print.css" title="print" />', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS);
$asset->addString('<link rel="stylesheet" type="text/css" href="' . SITE_TEMPLATE_PATH . '/colors.css"/>', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS);
$asset->addJs(SITE_TEMPLATE_PATH . '/script.js');
?>
<title><?php
$APPLICATION->ShowTitle();
?>
</title>
</head>
<body class="<?php
$APPLICATION->ShowProperty("BodyClass");
?>
">
<?php
if (IsModuleInstalled("im") && CBXFeatures::IsFeatureEnabled('WebMessenger')) {
$APPLICATION->IncludeComponent("bitrix:im.messenger", "", array("PATH_TO_SONET_EXTMAIL" => SITE_DIR . "company/personal/mail/"));
}
?>
<div id="page-wrapper">
<div id="panel"><?php
$APPLICATION->ShowPanel();
?>
</div>
<div id="page-inner">
<div id="site-selector">
<div id="site-selector-inner">
<div id="site-selector-menus">