本文整理汇总了PHP中COption::RemoveOption方法的典型用法代码示例。如果您正苦于以下问题:PHP COption::RemoveOption方法的具体用法?PHP COption::RemoveOption怎么用?PHP COption::RemoveOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COption
的用法示例。
在下文中一共展示了COption::RemoveOption方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DoUninstall
public function DoUninstall() {
global $DB, $DBType;
COption::RemoveOption($this->MODULE_ID);
UnRegisterModule($this->MODULE_ID);
DeleteDirFiles(
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/admin',
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin'
);
DeleteDirFiles(
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/js',
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/bx_ichannels'
);
UnRegisterModuleDependences(
'bx_ichannels',
'getImporters',
'bx_ichannels',
'CIChannelsRss',
'getImporter'
);
UnRegisterModuleDependences(
'bx_ichannels',
'getRssMappers',
'bx_ichannels',
'CIChannelsRssMapperByLink',
'getRssMapper'
);
$this->errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_ichannels/install/db/' . $DBType . '/uninstall.sql');
}
示例2: OnModuleInstalledEvent
function OnModuleInstalledEvent($id, $installed, $Module)
{
foreach (GetModuleEvents("main", "OnModuleInstalled", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($id, $installed));
}
$cModules = COption::GetOptionString("main", "mp_modules_date", "");
$arModules = array();
if (strlen($cModules) > 0) {
$arModules = unserialize($cModules);
}
if ($installed == "Y") {
$arModules[] = array("ID" => $id, "NAME" => htmlspecialcharsbx($Module->MODULE_NAME), "TMS" => time());
if (count($arModules) > 3) {
$arModules = array_slice($arModules, -3);
}
COption::SetOptionString("main", "mp_modules_date", serialize($arModules));
} else {
foreach ($arModules as $arid => $val) {
if ($val["ID"] == $id) {
unset($arModules[$arid]);
}
}
if (count($arModules) > 0) {
COption::SetOptionString("main", "mp_modules_date", serialize($arModules));
} else {
COption::RemoveOption("main", "mp_modules_date");
}
$_SESSION["MP_MOD_DELETED"] = array("ID" => $id, "NAME" => $Module->MODULE_NAME);
}
}
示例3: UnInstallDB
/**
* Удалить модуль из БД, удаление таблиц модуля
*
* @param array $arParams
* @return bool
*/
public function UnInstallDB($arParams = array())
{
// если у модуля есть свои таблицы, сюда следует поместить удаление этих таблиц
COption::RemoveOption($this->MODULE_ID);
\Bitrix\Main\ModuleManager::unRegisterModule($this->MODULE_ID);
return true;
}
示例4: UnInstallFiles
public function UnInstallFiles()
{
DeleteDirFilesEx("/bitrix/components/pr/pwd");
COption::RemoveOption($this->MODULE_ID);
return true;
}
示例5: DoUninstall
public function DoUninstall()
{
COption::RemoveOption('imageimport');
DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/imageimport/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin');
UnRegisterModule('imageimport');
return true;
}
示例6: UnInstallDB
function UnInstallDB($arParams = array())
{
global $DB, $APPLICATION;
$errors = false;
if (array_key_exists("savedata", $arParams) && $arParams["savedata"] != "Y") {
$errors = $DB->RunSQLBatch($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/support/install/db/' . strtolower($DB->type) . '/uninstall.sql');
if (!is_array($errors)) {
@set_time_limit(600);
COption::RemoveOption('support');
$db_res = $DB->Query("SELECT ID FROM b_file WHERE MODULE_ID = 'support'");
while ($arRes = $db_res->Fetch()) {
CFile::Delete($arRes['ID']);
}
if ($arParams['admin'] == 'Y') {
$this->UnInstallEvents();
}
}
}
if (is_array($errors)) {
$APPLICATION->ThrowException(implode(' ', $errors));
return false;
}
CAgent::RemoveModuleAgents('support');
UnRegisterModuleDependences('mail', 'OnGetFilterList', 'support', 'CSupportEMail', 'OnGetFilterList');
UnRegisterModule('support');
return true;
}
示例7: UnInstallDB
function UnInstallDB()
{
COption::RemoveOption("translate");
UnRegisterModuleDependences('main', 'OnPanelCreate', 'translate');
UnRegisterModule("translate");
return true;
}
示例8: DoUninstall
public function DoUninstall()
{
global $APPLICATION;
COption::RemoveOption($this->MODULE_ID);
UnRegisterModule($this->MODULE_ID);
$this->UnInstallFiles();
}
示例9: GetConfig
function GetConfig($siteId = false)
{
$shopLocationId = CSaleHelper::getShopLocationId($siteId);
$arShopLocation = CSaleHelper::getLocationByIdHitCached($shopLocationId);
if (!$arShopLocation) {
$arShopLocation = array();
}
$shopPrevLocationId = COption::GetOptionString('sale', 'delivery_rus_post_first_prev_loc', 0);
/* if shop's location was changed */
if ($shopPrevLocationId != $shopLocationId) {
COption::SetOptionString('sale', 'delivery_rus_post_first_prev_loc', $shopLocationId);
COption::RemoveOption('sale', 'delivery_rus_post_first_tarifs');
}
$arConfig = array('CONFIG_GROUPS' => array('wrapper' => GetMessage('SALE_DH_RPF_WRP_TITLE')));
$aviableBoxes = self::getAviableBoxes();
foreach ($aviableBoxes as $boxId => $arBox) {
CSaleDeliveryHelper::makeBoxConfig($boxId, $arBox, 'wrapper', $arConfig);
}
$arConfig['CONFIG']['tarif_section_1'] = array('TYPE' => 'SECTION', 'TITLE' => GetMessage('SALE_DH_RPF_TARIFS'), 'GROUP' => 'wrapper');
$arTarifs = CSaleHelper::getOptionOrImportValues('delivery_rus_post_first_tarifs', array('CDeliveryRusPostFirst', 'getTarifsByRegionFromCsv'), array($arShopLocation));
foreach (self::$TARIFS as $arTarif) {
$tarifId = $arTarif[self::$TARIF_IDX];
$arConfig['CONFIG']['TARIF_' . $tarifId] = array('TYPE' => 'STRING', 'DEFAULT' => isset($arTarifs[$tarifId]) ? $arTarifs[$tarifId] : '0', 'TITLE' => $arTarif[self::$TARIF_DESCR], 'GROUP' => 'wrapper');
}
/* Additional services */
foreach (self::$SERVICES as $serviceId => $arService) {
$tarifId = $arService[self::$TARIF_IDX];
$arConfig['CONFIG']['service_' . $tarifId . '_section'] = array('TYPE' => 'SECTION', 'TITLE' => $arService[self::$TARIF_DESCR], 'GROUP' => 'wrapper');
$arConfig['CONFIG']['service_' . $tarifId . '_enabled'] = array('TYPE' => 'CHECKBOX', 'TITLE' => GetMessage('SALE_DH_RPF_SRV_ALLOW'), 'GROUP' => 'wrapper', 'DEFAULT' => $serviceId == 'NOTIFICATION_REG' ? 'N' : 'Y', 'HIDE_BY_NAMES' => array('service_' . $tarifId . '_value'));
$arConfig['CONFIG']['service_' . $tarifId . '_value'] = array('TYPE' => 'STRING', 'TITLE' => GetMessage('SALE_DH_RPF_SRV_PRICE'), 'GROUP' => 'wrapper', 'DEFAULT' => isset($arTarifs[$tarifId]) ? $arTarifs[$tarifId] : '0');
}
return $arConfig;
}
示例10: UnInstallDB
function UnInstallDB($arParams = array())
{
global $DB, $DBType, $APPLICATION;
$this->errors = false;
UnRegisterModule("rficb.payment");
COption::RemoveOption("rficb.payment", "");
return true;
}
示例11: UnInstallEvents
function UnInstallEvents()
{
COption::RemoveOption("refreshlab.err404");
UnRegisterModuleDependences("main", "OnEpilog", "refreshlab.err404", "CErr404", "handler404");
UnRegisterModule("refreshlab.err404");
return true;
}
示例12: UnInstallDB
function UnInstallDB($arParams = Array())
{
global $DB, $DBType, $APPLICATION;
COption::RemoveOption($this->MODULE_ID, "message");
UnRegisterModule($this->MODULE_ID);
return true;
}
示例13: DoUninstall
public function DoUninstall()
{
COption::RemoveOption('bx_moddev');
DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_moddev/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin');
// DeleteDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/bx_moddev/install/components', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components');
DeleteDirFilesEx("/bitrix/js/bx_moddev");
UnRegisterModule('bx_moddev');
return true;
}
示例14: enableSignature
public static function enableSignature($enable)
{
$enable = (bool) $enable;
if ($enable) {
\COption::RemoveOption('crm', 'enable_b24_email_sign');
} else {
\COption::SetOptionString('crm', 'enable_b24_email_sign', 'N');
}
}
示例15: DoUninstall
function DoUninstall()
{
global $DOCUMENT_ROOT, $APPLICATION;
COption::RemoveOption($this->MODULE_ID, 'null');
$this->UnInstallFiles();
$this->UnInstallEvents();
UnRegisterModule($this->MODULE_ID);
$APPLICATION->IncludeAdminFile(GetMessage('CODECRAFT_NULL_UNINSTALL_TITLE', array('#MODULE#', $this->MODULE_NAME)), $DOCUMENT_ROOT . BX_ROOT . "/modules/" . $this->MODULE_ID . "/install/unstep.php");
}