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


PHP CUserTypeEntity::Delete方法代码示例

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


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

示例1: deleteUserTypeEntityIfExists

 public function deleteUserTypeEntityIfExists($entityId, $fieldName)
 {
     $aItem = $this->getUserTypeEntity($entityId, $fieldName);
     if (!$aItem) {
         return false;
     }
     $entity = new \CUserTypeEntity();
     if ($entity->Delete($aItem['ID'])) {
         return true;
     }
     $this->throwException(__METHOD__, 'UserType not deleted');
 }
开发者ID:andreyryabin,项目名称:sprint.migration,代码行数:12,代码来源:UserTypeEntityHelper.php

示例2: down

 public function down()
 {
     global $APPLICATION;
     $arHlData = $this->arHlData;
     \Bitrix\Main\Loader::includeModule("highloadblock");
     $arHlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('filter' => array('TABLE_NAME' => \Hawkart\Megatv\PeopleTable::getTableName())))->fetch();
     if ($arHlblock) {
         foreach ($arHlData as $fieldName => $fieldValue) {
             $oUserTypeEntity = new \CUserTypeEntity();
             $resProperty = \CUserTypeEntity::GetList(array(), array('ENTITY_ID' => 'HLBLOCK_' . $arHlblock["ID"], 'FIELD_NAME' => $fieldName));
             if ($aUserHasField = $resProperty->Fetch()) {
                 $oUserTypeEntity->Delete($aUserHasField['ID']);
                 $this->outSuccess("Свойство удалено!");
             }
         }
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:17,代码来源:Version20160829145834.php

示例3: down

 public function down()
 {
     global $APPLICATION;
     \Bitrix\Main\Loader::includeModule("highloadblock");
     $arHlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('filter' => array('TABLE_NAME' => \Hawkart\Megatv\SubscribeTable::getTableName())))->fetch();
     if ($arHlblock) {
         $arProps = array("UF_DATETIME_TO");
         foreach ($arProps as $prop_name) {
             $oUserTypeEntity = new \CUserTypeEntity();
             $resProperty = \CUserTypeEntity::GetList(array(), array('ENTITY_ID' => 'HLBLOCK_' . $arHlblock["ID"], 'FIELD_NAME' => $prop_name));
             if ($aUserHasField = $resProperty->Fetch()) {
                 $oUserTypeEntity->Delete($aUserHasField['ID']);
                 $this->outSuccess("Свойство 'Дата окончания подписки' удалено!");
             }
         }
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:17,代码来源:Version20160720205816.php

示例4: Delete

 /**
  * Delete
  * @param $entityName
  * @param $fieldName
  * @return mixed
  * @throws \Exception
  */
 public static function Delete($entityName, $fieldName)
 {
     if (empty($entityName)) {
         throw new \Exception('entityName is required');
     }
     if (empty($fieldName)) {
         throw new \Exception('fieldName is required.');
     }
     $filter = array('NAME' => $entityName);
     $hlBlockDbRes = HL\HighloadBlockTable::getList(array("filter" => $filter));
     if (!$hlBlockDbRes->getSelectedRowsCount()) {
         throw new \Exception('Not found highloadBlock with entityName = ' . $entityName);
     }
     $hlBlockRow = $hlBlockDbRes->fetch();
     $entity = HL\HighloadBlockTable::compileEntity($hlBlockRow);
     $entityDataClass = $entity->getDataClass();
     $obList = $entityDataClass::getList(array("select" => array("ID")));
     if ($obList->getSelectedRowsCount() > 0) {
         throw new \Exception('Unable to remove a highloadBlock[ ' . $entityName . ' ], because it has elements');
     }
     $userFieldEntity = self::_getEntityId($entityName);
     $typeEntityDbRes = \CUserTypeEntity::GetList(array(), array("ENTITY_ID" => $userFieldEntity, "FIELD_NAME" => $fieldName));
     if ($typeEntityDbRes->SelectedRowsCount() > 0) {
         $hlBlockFieldData = $typeEntityDbRes->Fetch();
         $userType = new \CUserTypeEntity();
         if (!$userType->Delete($hlBlockFieldData['ID'])) {
             throw new \Exception('Not delete Hlblock field');
         }
         return $hlBlockFieldData['ID'];
     }
 }
开发者ID:cjp2600,项目名称:bim-core,代码行数:38,代码来源:HighloadblockFieldIntegrate.php

示例5: UnInstallUserFields

 function UnInstallUserFields($arParams = array())
 {
     if (!$arParams['savedata']) {
         $res = CUserTypeEntity::GetList(array(), array('ENTITY_ID' => 'USER', 'FIELD_NAME' => 'UF_IM_SEARCH'));
         $arFieldData = $res->Fetch();
         if (isset($arFieldData['ID'])) {
             $CUserTypeEntity = new CUserTypeEntity();
             $CUserTypeEntity->Delete($arFieldData['ID']);
         }
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:12,代码来源:index.php

示例6: DeleteField

 public function DeleteField($ID)
 {
     $obUserField = new CUserTypeEntity();
     @set_time_limit(0);
     $this->cdb->StartTransaction();
     if (!$obUserField->Delete($ID)) {
         $this->cdb->Rollback();
         $this->SetError(array('id' => 'DELETE_ENTITY_ID', 'text' => GetMessage('CRM_FIELDS_ERROR_DELETE_ENTITY_ID')));
         return false;
     }
     $this->cdb->Commit();
     UserFieldHistory::processRemoval(CCrmOwnerType::ResolveIDByUFEntityID($this->sUFEntityID), $ID);
     $this->arUFList = $this->GetUserFields($this->sUFEntityID, 0, LANGUAGE_ID);
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:15,代码来源:crm_fields.php

示例7: UnInstallDB

 function UnInstallDB($arParams = array())
 {
     global $DB, $DBType, $APPLICATION;
     $this->errors = false;
     if (!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y") {
         $rsUserType = CUserTypeEntity::getList(array(), array('ENTITY_ID' => 'TASKS_TASK', 'FIELD_NAME' => 'UF_TASK_WEBDAV_FILES'));
         if ($arUserType = $rsUserType->fetch()) {
             $obUserField = new CUserTypeEntity();
             $obUserField->Delete($arUserType['ID']);
         }
         $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/tasks/install/db/" . strtolower($DB->type) . "/uninstall.sql");
     }
     //delete agents
     CAgent::RemoveModuleAgents("tasks");
     if (CModule::IncludeModule("search")) {
         CSearch::DeleteIndex("tasks");
     }
     UnRegisterModule("tasks");
     UnRegisterModuleDependences("search", "OnReindex", "tasks", "CTasks", "OnSearchReindex");
     UnRegisterModuleDependences("main", "OnUserDelete", "tasks", "CTasks", "OnUserDelete");
     UnRegisterModuleDependences("im", "OnGetNotifySchema", "tasks", "CTasksNotifySchema", "OnGetNotifySchema");
     UnRegisterModuleDependences('main', 'OnBeforeUserDelete', 'tasks', 'CTasks', 'OnBeforeUserDelete');
     UnRegisterModuleDependences("pull", "OnGetDependentModule", "tasks", "CTasksPullSchema", "OnGetDependentModule");
     UnRegisterModuleDependences('search', 'BeforeIndex', 'tasks', 'CTasksTools', 'FixForumCommentURL');
     UnRegisterModuleDependences('intranet', 'OnPlannerInit', 'tasks', 'CTaskPlannerMaintance', 'OnPlannerInit');
     UnRegisterModuleDependences('intranet', 'OnPlannerAction', 'tasks', 'CTaskPlannerMaintance', 'OnPlannerAction');
     UnRegisterModuleDependences('rest', 'OnRestServiceBuildDescription', 'tasks', 'CTaskRestService', 'OnRestServiceBuildDescription');
     UnRegisterModuleDependences('forum', 'OnCommentTopicAdd', 'tasks', 'CTaskComments', 'onCommentTopicAdd');
     UnRegisterModuleDependences('forum', 'OnAfterCommentTopicAdd', 'tasks', 'CTaskComments', 'onAfterCommentTopicAdd');
     UnRegisterModuleDependences('forum', 'OnAfterCommentAdd', 'tasks', 'CTaskComments', 'onAfterCommentAdd');
     UnRegisterModuleDependences('forum', 'OnAfterCommentUpdate', 'tasks', 'CTaskComments', 'onAfterCommentUpdate');
     UnRegisterModuleDependences('forum', 'OnModuleUnInstall', 'tasks', 'CTasksRarelyTools', 'onForumUninstall');
     UnRegisterModuleDependences('webdav', 'OnModuleUnInstall', 'tasks', 'CTasksRarelyTools', 'onWebdavUninstall');
     UnRegisterModuleDependences('intranet', 'OnModuleUnInstall', 'tasks', 'CTasksRarelyTools', 'onIntranetUninstall');
     UnRegisterModuleDependences('timeman', 'OnAfterTMDayStart', 'tasks', 'CTaskPlannerMaintance', 'OnAfterTMDayStart');
     UnRegisterModuleDependences('timeman', 'OnAfterTMDayStart', 'tasks', 'CTaskCountersNotifier', 'onAfterTimeManagerDayStart');
     UnRegisterModuleDependences('timeman', 'OnAfterTMEntryUpdate', 'tasks', 'CTaskTimerManager', 'onAfterTMEntryUpdate');
     UnRegisterModuleDependences('tasks', 'OnBeforeTaskUpdate', 'tasks', 'CTaskTimerManager', 'onBeforeTaskUpdate');
     UnRegisterModuleDependences('tasks', 'OnBeforeTaskDelete', 'tasks', 'CTaskTimerManager', 'onBeforeTaskDelete');
     UnRegisterModuleDependences('socialnetwork', 'OnBeforeSocNetGroupDelete', 'tasks', 'CTasks', 'onBeforeSocNetGroupDelete');
     UnRegisterModuleDependences("main", "OnAfterRegisterModule", "main", "tasks", "InstallUserFields", "/modules/tasks/install/index.php");
     // check webdav UF
     UnRegisterModuleDependences("main", "OnBeforeUserTypeAdd", "tasks", "CTasksRarelyTools", "onBeforeUserTypeAdd");
     UnRegisterModuleDependences("main", "OnBeforeUserTypeUpdate", "tasks", "CTasksRarelyTools", "onBeforeUserTypeUpdate");
     UnRegisterModuleDependences("main", "OnBeforeUserTypeDelete", "tasks", "CTasksRarelyTools", "onBeforeUserTypeDelete");
     // im "ilike"
     UnRegisterModuleDependences("main", "OnGetRatingContentOwner", "tasks", "CTaskNotifications", "OnGetRatingContentOwner");
     UnRegisterModuleDependences("im", "OnGetMessageRatingVote", "tasks", "CTaskNotifications", "OnGetMessageRatingVote");
     if ((!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y") && IsModuleInstalled('socialnetwork') && CModule::IncludeModule('socialnetwork')) {
         $dbRes = CSocNetLog::GetList(array(), array("EVENT_ID" => "tasks"), false, false, array("ID"));
         if ($dbRes) {
             while ($arRes = $dbRes->Fetch()) {
                 CSocNetLog::Delete($arRes["ID"]);
             }
         }
     }
     // Remove tasks from IM
     if (IsModuleInstalled('im') && CModule::IncludeModule('im')) {
         if (method_exists('CIMNotify', 'DeleteByModule')) {
             CIMNotify::DeleteByModule('tasks');
         }
     }
     // remove comment edit flags
     COption::RemoveOption('tasks', 'task_comment_allow_edit', '');
     COption::RemoveOption('tasks', 'task_comment_allow_remove', '');
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:67,代码来源:index.php

示例8: UnInstallUserFields

 function UnInstallUserFields()
 {
     $keysUserFields = array("UF_CATEGORY_CODE", "UF_ANSWER_ID", "UF_ORIGINAL_ID", "UF_STATUS");
     global $USER_FIELD_MANAGER;
     $oUserFields = $USER_FIELD_MANAGER->GetUserFields("BLOG_POST");
     $ent = new CUserTypeEntity();
     foreach ($oUserFields as $UserFieldName => $arUserField) {
         if (in_array($UserFieldName, $keysUserFields)) {
             $ent->Delete($arUserField["ID"]);
         }
     }
     return;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:13,代码来源:index.php

示例9: UnInstallUserFields

 function UnInstallUserFields()
 {
     $ent = new CUserTypeEntity();
     foreach (array("disk_file", "disk_version") as $type) {
         $rsData = CUserTypeEntity::GetList(array("ID" => "ASC"), array("USER_TYPE_ID" => $type));
         if ($rsData && ($arRes = $rsData->Fetch())) {
             do {
                 $ent->Delete($arRes['ID']);
             } while ($arRes = $rsData->Fetch());
         }
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:12,代码来源:index.php

示例10: UnInstallUserFields

	function UnInstallUserFields($id = "all")
	{
		$id = (empty($id) ? "all" : (in_array($id, array("all", "webdav"/*, "blog"*/)) ? $id : false));
		if (!!$id)
		{
			$arFields = array(
				array(
					"ENTITY_ID" => "SONET_LOG",
					"FIELD_NAME" => "UF_SONET_LOG_FILE",
					"XML_ID" => "UF_SONET_LOG_FILE"
				),
				array(
					"ENTITY_ID" => "SONET_LOG",
					"FIELD_NAME" => "UF_SONET_LOG_DOC",
					"XML_ID" => "UF_SONET_LOG_DOC"
				),
				array(
					"ENTITY_ID" => "SONET_COMMENT",
					"FIELD_NAME" => "UF_SONET_COM_FILE",
					"XML_ID" => "UF_SONET_COM_FILE"
				),
				array(
					"ENTITY_ID" => "SONET_COMMENT",
					"FIELD_NAME" => "UF_SONET_COM_DOC",
					"XML_ID" => "UF_SONET_COM_DOC"
				),
				array(
					"ENTITY_ID" => "BLOG_POST",
					"FIELD_NAME" => "UF_BLOG_POST_IMPRTNT",
					"XML_ID" => "UF_BLOG_POST_IMPRTNT"
				),
				array(
					"ENTITY_ID" => "BLOG_POST",
					"FIELD_NAME" => "UF_BLOG_POST_VOTE",
					"XML_ID" => "UF_BLOG_POST_VOTE"
				),
			);

			if ($id == "webdav")
				$arFields = array(
					array(
						"ENTITY_ID" => "SONET_LOG",
						"FIELD_NAME" => "UF_SONET_LOG_DOC",
						"XML_ID" => "UF_SONET_LOG_DOC"
					),
					array(
						"ENTITY_ID" => "SONET_COMMENT",
						"FIELD_NAME" => "UF_SONET_COM_DOC",
						"XML_ID" => "UF_SONET_COM_DOC"
					),
				);

			foreach ($arFields as $arField)
			{
				$rsData = CUserTypeEntity::GetList(array("ID" => "ASC"), $arField);
				if ($arRes = $rsData->Fetch())
				{
					$ent = new CUserTypeEntity;
					$ent->Delete($arRes['ID']);
					if ($arField["FIELD_NAME"] == "UF_BLOG_POST_IMPRTNT" && $GLOBALS["DB"]->TableExists("b_uts_blog_post") &&
						$GLOBALS["DB"]->IndexExists("b_uts_blog_post", array("UF_BLOG_POST_IMPRTNT", "VALUE_ID")))
					{
						$GLOBALS["DB"]->Query("DROP INDEX UX_UF_BLOG_POST_IMPRTNT ON b_uts_blog_post", true);
					}
				}
			}
		}
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:68,代码来源:index.php

示例11: UnInstallUserTypes

	public function UnInstallUserTypes($arParams = array())
	{
		if((!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y"))
		{
			$ob = new \CUserTypeEntity();

			$arFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields(SimpleModule\EntityTable::getUfId());
			foreach($arFields as $key => $val)
				$ob->Delete($val["ID"]);

			UnRegisterModuleDependences("main", "OnUserTypeBuildList", self::MODULE_ID, "SimpleModule\\Usertype\\StatLocation", "GetUserTypeDescription");
		}

		return true;
	}
开发者ID:alexshipil,项目名称:bitrix.simple.module,代码行数:15,代码来源:index.php

示例12: array

$iblockID = false;
if ($arIBlock = $rsIBlock->Fetch()) {
    $iblockID = $arIBlock["ID"];
    if (WIZARD_INSTALL_DEMO_DATA) {
        $arCatalog = CCatalog::GetByIDExt($arIBlock["ID"]);
        if (is_array($arCatalog) && in_array($arCatalog['CATALOG_TYPE'], array('P', 'X')) == true) {
            CCatalog::UnLinkSKUIBlock($arIBlock["ID"]);
            CIBlock::Delete($arCatalog['OFFERS_IBLOCK_ID']);
        }
        CIBlock::Delete($arIBlock["ID"]);
        $iblockID = false;
        COption::SetOptionString("eshop", "demo_deleted", "N", "", WIZARD_SITE_ID);
        $dbRes = CUserTypeEntity::GetList(array(), array("ENTITY_ID" => 'IBLOCK_' . $arIBlock["ID"] . '_SECTION'));
        while ($arRes = $dbRes->Fetch()) {
            $userType = new CUserTypeEntity();
            $userType->Delete($arRes["ID"]);
        }
    }
}
$dbResultList = CCatalogGroup::GetList(array(), array("CODE" => "BASE"));
if (!$dbResultList->Fetch()) {
    $arFields = array();
    $rsLanguage = CLanguage::GetList($by, $order, array());
    while ($arLanguage = $rsLanguage->Fetch()) {
        WizardServices::IncludeServiceLang("catalog.php", $arLanguage["ID"]);
        $arFields["USER_LANG"][$arLanguage["ID"]] = GetMessage("WIZ_PRICE_NAME");
    }
    $arFields["BASE"] = "Y";
    $arFields["SORT"] = 100;
    $arFields["NAME"] = "BASE";
    $arFields["USER_GROUP"] = array(1, 2);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:catalog.php

示例13: UnInstallUserFields

	function UnInstallUserFields()
	{
		@set_time_limit(0);
		$db_res = CUserTypeEntity::GetList(array("ID" => "ASC"), array("ENTITY_ID" => "BLOG_POST", "FIELD_NAME" => "UF_BLOG_POST_IMPORTANT"));
		if ($db_res && ($res = $db_res->Fetch())) {
			$GLOBALS["DB"]->StartTransaction();
			$obUserField = new CUserTypeEntity;
			@set_time_limit(0);
			do {
				if ($obUserField->Delete($res["ID"]))
					$GLOBALS["DB"]->Rollback();
			} while ($res = $db_res->Fetch());
			$GLOBALS["DB"]->Commit();
		}
	}
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:15,代码来源:index.php

示例14: UnInstallUserFields

	function UnInstallUserFields()
	{
		global $USER_FIELD_MANAGER;
		$errors = null;

		$arFields = array(
			"BLOG_POST" => array(
				"ENTITY_ID" => "BLOG_POST",
				"FIELD_NAME" => "UF_BLOG_POST_DOC",
				"XML_ID" => "UF_BLOG_POST_DOC"
			),
			"BLOG_COMMENT" => array(
				"ENTITY_ID" => "BLOG_COMMENT",
				"FIELD_NAME" => "UF_BLOG_COMMENT_DOC",
				"XML_ID" => "UF_BLOG_COMMENT_DOC"
			),
		);

		foreach ($arFields as $fieldName => $arField)
		{
			$rsData = CUserTypeEntity::GetList(array($by=>$order), $arField);
			if ($arRes = $rsData->Fetch())
			{
				$ent = new CUserTypeEntity;
				$ent->Delete($arRes['ID']);
			}
		}
		return $errors;
	}
开发者ID:nycmic,项目名称:bittest,代码行数:29,代码来源:index.php

示例15: DropSectionProperty

 public static function DropSectionProperty()
 {
     // Check UF for iblock sections
     global $USER_FIELD_MANAGER;
     $db_res = CUserTypeEntity::GetList(array('ID' => 'ASC'), array("FIELD_NAME" => "UF_CAL_CONVERTED"));
     while ($r = $db_res->GetNext()) {
         $obUserField = new CUserTypeEntity();
         $r = $obUserField->Delete($r["ID"]);
         $USER_FIELD_MANAGER->arFieldsCache = array();
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:11,代码来源:calendar_convert.php


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