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


PHP CBitrixComponent::clearComponentCache方法代码示例

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


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

示例1: OnAfterIndexAdd

 function OnAfterIndexAdd($ID, $arFields)
 {
     if (isset($arFields["PARAMS"]) && isset($arFields["PARAMS"]["socnet_group"])) {
         CBitrixComponent::clearComponentCache("bitrix:search.tags.cloud");
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:6,代码来源:search.php

示例2: unset

            ?>
			<script type="text/javascript">
				jsSelectUtils.selectOption(BX('iblock'), <?php 
            echo $IBLOCK_ID;
            ?>
);
				DoNext(<?php 
            echo CUtil::PhpToJSObject($NS);
            ?>
);
			</script>
			<?php 
        } else {
            $index->endIndex();
            \Bitrix\Iblock\PropertyIndex\Manager::checkAdminNotification();
            CBitrixComponent::clearComponentCache("bitrix:catalog.smart.filter");
            unset($iblockDropDown[$IBLOCK_ID]);
            if (empty($iblockDropDown) || $NS['iblock'] > 0) {
                $mess = GetMessage("IBLOCK_REINDEX_TOTAL") . " <b>" . $NS[$IBLOCK_ID]["CNT"] . "</b>";
            } else {
                $mess = GetMessage("IBLOCK_REINDEX_TOTAL") . " <span id=\"some_left\"><b>" . $NS[$IBLOCK_ID]["CNT"] . "</b></span>";
            }
            $message = new CAdminMessage(array("MESSAGE" => GetMessage("IBLOCK_REINDEX_COMPLETE"), "DETAILS" => $mess, "HTML" => true, "TYPE" => "OK"));
            echo $message->Show();
            ?>
			<script type="text/javascript">
				jsSelectUtils.deleteOption(BX('iblock'), <?php 
            echo $IBLOCK_ID;
            ?>
);
				<?php 
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_reindex.php

示例3: SaveMenu

 function SaveMenu($path, $aMenuLinksTmp, $sMenuTemplateTmp)
 {
     global $APPLICATION;
     CMain::InitPathVars($site, $path);
     $DOC_ROOT = CSite::GetSiteDocRoot($site);
     $strMenuLinks = "";
     if (strlen($sMenuTemplateTmp) > 0) {
         $strMenuLinks .= "\$sMenuTemplate = \"" . CFileMan::EscapePHPString($sMenuTemplateTmp) . "\";\n";
     }
     $strMenuLinks .= "\$aMenuLinks = Array(";
     $i = 0;
     foreach ($aMenuLinksTmp as $arMenuItem) {
         $i++;
         $strMenuLinksTmp = "";
         if ($i > 1) {
             $strMenuLinksTmp .= ",";
         }
         $strMenuLinksTmp .= "\n" . "\tArray(\n" . "\t\t\"" . CFileMan::EscapePHPString($arMenuItem[0]) . "\", \n" . "\t\t\"" . CFileMan::EscapePHPString($arMenuItem[1]) . "\", \n" . "\t\tArray(";
         if (is_array($arMenuItem[2])) {
             for ($j = 0, $l = count($arMenuItem[2]); $j < $l; $j++) {
                 if ($j > 0) {
                     $strMenuLinksTmp .= ", ";
                 }
                 $strMenuLinksTmp .= "\"" . CFileMan::EscapePHPString($arMenuItem[2][$j]) . "\"";
             }
         }
         $strMenuLinksTmp .= "), \n";
         $strMenuLinksTmp .= "\t\tArray(";
         if (is_array($arMenuItem[3])) {
             $arParams = array_keys($arMenuItem[3]);
             for ($j = 0, $l = count($arParams); $j < $l; $j++) {
                 if ($j > 0) {
                     $strMenuLinksTmp .= ", ";
                 }
                 $strMenuLinksTmp .= "\"" . CFileMan::EscapePHPString($arParams[$j]) . "\"=>" . "\"" . CFileMan::EscapePHPString($arMenuItem[3][$arParams[$j]]) . "\"";
             }
         }
         $strMenuLinksTmp .= "), \n" . "\t\t\"" . CFileMan::EscapePHPString($arMenuItem[4]) . "\" \n" . "\t)";
         $strMenuLinks .= $strMenuLinksTmp;
     }
     $strMenuLinks .= "\n);";
     $APPLICATION->SaveFileContent($DOC_ROOT . $path, "<" . "?\n" . $strMenuLinks . "\n?" . ">");
     $GLOBALS["CACHE_MANAGER"]->CleanDir("menu");
     CBitrixComponent::clearComponentCache("bitrix:menu");
 }
开发者ID:Satariall,项目名称:izurit,代码行数:45,代码来源:fileman.php

示例4: die

<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_js.php";
/** @global CUser $USER */
global $USER;
/** @global CCacheManager $CACHE_MANAGER */
global $CACHE_MANAGER;
if (!$USER->CanDoOperation('cache_control') || !check_bitrix_sessid()) {
    die(GetMessage("ACCESS_DENIED"));
}
if ($_GET["site_id"] == '') {
    die("Empty site_id.");
}
$sites = CSite::GetByID($_GET["site_id"]);
if (!($site = $sites->Fetch())) {
    die("Incorrect site_id.");
}
$aComponents = explode(",", $_GET["component_name"]);
foreach ($aComponents as $component_name) {
    CBitrixComponent::clearComponentCache($component_name, $site["ID"]);
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_js.php";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:23,代码来源:clear_component_cache.php

示例5: RemoveFileAccessPermission

 function RemoveFileAccessPermission($path, $arGroups = false)
 {
     global $CACHE_MANAGER;
     CMain::InitPathVars($site, $path);
     $DOC_ROOT = CSite::GetSiteDocRoot($site);
     $path = rtrim($path, "/");
     if ($path == '') {
         $path = "/";
     }
     if (($p = bxstrrpos($path, "/")) !== false) {
         $path_file = substr($path, $p + 1);
         $path_dir = substr($path, 0, $p);
     } else {
         return false;
     }
     $PERM = array();
     $io = CBXVirtualIo::GetInstance();
     if (!$io->FileExists($DOC_ROOT . $path_dir . "/.access.php")) {
         return true;
     }
     include $io->GetPhysicalName($DOC_ROOT . $path_dir . "/.access.php");
     $str = "<?\n";
     foreach ($PERM as $file => $arPerm) {
         if ($file != $path_file || $arGroups !== false) {
             foreach ($arPerm as $group => $perm) {
                 if ($arGroups !== false) {
                     //compatibility with group id
                     $bExists = false;
                     if (in_array($group, $arGroups)) {
                         $bExists = true;
                     } elseif (preg_match('/^G[0-9]+$/', $group) && in_array(substr($group, 1), $arGroups)) {
                         $bExists = true;
                     } elseif (preg_match('/^[0-9]+$/', $group) && in_array('G' . $group, $arGroups)) {
                         $bExists = true;
                     }
                 }
                 if ($file != $path_file || $arGroups !== false && !$bExists) {
                     $str .= "\$PERM[\"" . EscapePHPString($file) . "\"][\"" . EscapePHPString($group) . "\"]=\"" . EscapePHPString($perm) . "\";\n";
                 }
             }
         }
     }
     $str .= "?" . ">";
     $this->SaveFileContent($DOC_ROOT . $path_dir . "/.access.php", $str);
     $CACHE_MANAGER->CleanDir("menu");
     CBitrixComponent::clearComponentCache("bitrix:menu");
     unset($this->FILE_PERMISSION_CACHE[$site . "|" . $path_dir . "/.access.php"]);
     foreach (GetModuleEvents("main", "OnChangePermissions", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array(array($site, $path), array()));
     }
     return true;
 }
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:52,代码来源:main.php

示例6:

else
{

if(!$USER->CanDoOperation('cache_control') && !$USER->CanDoOperation('view_other_settings'))
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

$errorMessage = "";
$okMessage = "";


if ($REQUEST_METHOD=="POST" && $clearcache=="Y" && strlen($cachetype)>0 && check_bitrix_sessid() && $isAdmin)
{
	if($cachetype=="menu")
	{
		$GLOBALS["CACHE_MANAGER"]->CleanDir("menu");
		CBitrixComponent::clearComponentCache("bitrix:menu");
	}
	elseif($cachetype=="managed")
	{
		$GLOBALS["CACHE_MANAGER"]->CleanAll();
		$GLOBALS["stackCacheManager"]->CleanAll();
	}
	elseif($cachetype=="html")
	{
		CHTMLPagesCache::CleanAll();
	}
	else
	{
		BXClearCache($cachetype=="all");
		$GLOBALS["CACHE_MANAGER"]->CleanAll();
		$GLOBALS["stackCacheManager"]->CleanAll();
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:cache.php

示例7: DoUninstall

 function DoUninstall()
 {
     global $DOCUMENT_ROOT, $APPLICATION, $step;
     $step = IntVal($step);
     if ($step < 2) {
         $APPLICATION->IncludeAdminFile(GetMessage("VI_UNINSTALL_TITLE_2"), $DOCUMENT_ROOT . "/bitrix/modules/voximplant/install/unstep1.php");
     } elseif ($step == 2) {
         $this->UnInstallDB(array("savedata" => $_REQUEST["savedata"]));
         $this->UnInstallUserFields(array("savedata" => $_REQUEST["savedata"]));
         $this->UnInstallFiles();
         $GLOBALS["CACHE_MANAGER"]->CleanDir("menu");
         CBitrixComponent::clearComponentCache("bitrix:menu");
         $APPLICATION->IncludeAdminFile(GetMessage("VI_UNINSTALL_TITLE_2"), $DOCUMENT_ROOT . "/bitrix/modules/voximplant/install/unstep2.php");
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:15,代码来源:index.php

示例8: OnAfterIndexAdd

 public static function OnAfterIndexAdd($ID, $arFields)
 {
     if (isset($arFields["PARAMS"]) && is_array($arFields["PARAMS"]) && array_key_exists("socnet_group", $arFields["PARAMS"])) {
         CBitrixComponent::clearComponentCache("bitrix:search.tags.cloud");
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:6,代码来源:search.php


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