當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HighloadBlockTable::getList方法代碼示例

本文整理匯總了PHP中Bitrix\Highloadblock\HighloadBlockTable::getList方法的典型用法代碼示例。如果您正苦於以下問題:PHP HighloadBlockTable::getList方法的具體用法?PHP HighloadBlockTable::getList怎麽用?PHP HighloadBlockTable::getList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Bitrix\Highloadblock\HighloadBlockTable的用法示例。


在下文中一共展示了HighloadBlockTable::getList方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getPropDirectory

function getPropDirectory(&$property)
{
    if (empty($property)) {
        return false;
    }
    if (!is_array($property)) {
        return false;
    }
    if (!isset($property['USER_TYPE_SETTINGS']['TABLE_NAME']) || empty($property['USER_TYPE_SETTINGS']['TABLE_NAME'])) {
        return false;
    }
    $highLoadInclude = \Bitrix\Main\Loader::includeModule('highloadblock');
    $highBlock = \Bitrix\Highloadblock\HighloadBlockTable::getList(array("filter" => array('TABLE_NAME' => $property['USER_TYPE_SETTINGS']['TABLE_NAME'])))->fetch();
    if (!isset($highBlock['ID'])) {
        return false;
    }
    $entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($highBlock);
    $entityDataClass = $entity->getDataClass();
    $entityList = $entityDataClass::getList();
    while ($arEntityItem = $entityList->Fetch()) {
        $val =& $property["VALUES"][$arEntityItem["UF_XML_ID"]];
        //foreach($property["VALUES"] as &$val){
        if (!empty($arEntityItem["UF_FILE"])) {
            $property["PICTURE_INCLUDED"] = true;
            $arEntityItem["~UF_FILE"] = $arEntityItem["UF_FILE"];
            $arEntityItem["PICTURE"] = CFile::GetPath($arEntityItem["~UF_FILE"]);
        }
        if (!empty($arEntityItem)) {
            $val = array_merge($val, $arEntityItem);
        }
        //}
        //echo'<pre>';print_r($arEntityItem);echo'</pre>';
    }
    return true;
}
開發者ID:sharapudinov,項目名稱:lovestore.top,代碼行數:35,代碼來源:functions.php

示例2: UnInstallDB

 function UnInstallDB($arParams = array())
 {
     global $DB, $DBType, $APPLICATION;
     $this->errors = false;
     if (!array_key_exists("save_tables", $arParams) || $arParams["save_tables"] != "Y") {
         // remove user data
         CModule::IncludeModule("highloadblock");
         $result = \Bitrix\Highloadblock\HighloadBlockTable::getList();
         while ($hldata = $result->fetch()) {
             \Bitrix\Highloadblock\HighloadBlockTable::delete($hldata['ID']);
         }
         // remove hl system data
         $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/highloadblock/install/db/" . strtolower($DB->type) . "/uninstall.sql");
     }
     UnRegisterModule("highloadblock");
     UnRegisterModuleDependences("main", "OnBeforeUserTypeAdd", "highloadblock", '\\Bitrix\\Highloadblock\\HighloadBlockTable', "OnBeforeUserTypeAdd");
     UnRegisterModuleDependences("main", "OnAfterUserTypeAdd", "highloadblock", '\\Bitrix\\Highloadblock\\HighloadBlockTable', "onAfterUserTypeAdd");
     UnRegisterModuleDependences("main", "OnBeforeUserTypeDelete", "highloadblock", '\\Bitrix\\Highloadblock\\HighloadBlockTable', "OnBeforeUserTypeDelete");
     UnRegisterModuleDependences('main', 'OnUserTypeBuildList', 'highloadblock', 'CUserTypeHlblock', 'GetUserTypeDescription');
     UnRegisterModuleDependences('iblock', 'OnIBlockPropertyBuildList', 'highloadblock', 'CIBlockPropertyDirectory', 'GetUserTypeDescription');
     if ($this->errors !== false) {
         $APPLICATION->ThrowException(implode("<br>", $this->errors));
         return false;
     }
     return true;
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:26,代碼來源:index.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: 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

示例5: getEntityByName

 /**
  * Ищет данные о сущности по ее названию
  * @param string $name
  * @return array
  */
 public static function getEntityByName($name)
 {
     if (empty(self::$_entities[$name]) || !array_key_exists($name, self::$_entities[$name])) {
         $cid = 'bxar\\helpers\\HlEntity_' . $name;
         $obCache = new \CPHPCache();
         if ($obCache->InitCache(7200, $cid, '/')) {
             self::$_entities[$name] = $obCache->GetVars();
         } elseif ($obCache->StartDataCache()) {
             $filter = ['select' => ['ID', 'NAME', 'TABLE_NAME'], 'filter' => ['NAME' => $name]];
             $hlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList($filter)->fetch();
             if (!empty($hlblock['ID'])) {
                 self::$_entities[$name] = $hlblock;
             } else {
                 self::$_entities[$name] = null;
             }
             $obCache->EndDataCache(self::$_entities[$name]);
         }
     }
     return self::$_entities[$name];
 }
開發者ID:marvin255,項目名稱:bxar,代碼行數:25,代碼來源:HlEntity.php

示例6: GetCityList

    public static function GetCityList() {

        $arResult = array();

        $rsData = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('filter'=>array('NAME'=>CITY_LIST_HLB)));
        if ( !($arData = $rsData->fetch()) ){
            echo 'Инфоблок не найден';
        } else {
            $Entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arData);

            $Query = new \Bitrix\Main\Entity\Query($Entity);
            $Query->setSelect(array('*'));

            $result = $Query->exec();
            $result = new CDBResult($result);

            while ($row = $result->Fetch()){
                $arResult[$row['UF_CITY_CODE']] = $row['UF_CITY_NAME'];
            }

        }
        return $arResult;

    }
開發者ID:AlexPrya,項目名稱:iShop,代碼行數:24,代碼來源:CISCity.php

示例7: getMetaData

 function getMetaData()
 {
     // echo $this->hlblock;
     $dbHblock = HL\HighloadBlockTable::getList(array('filter' => array('ID' => $this->hlblock)));
     if ($res = $dbHblock->Fetch()) {
         $obj = CUserTypeEntity::GetList(array(), array("ENTITY_ID" => "HLBLOCK_" . $this->hlblock));
         while ($el = $obj->Fetch()) {
         }
     }
     return $result;
 }
開發者ID:aak74,項目名稱:hlblock,代碼行數:11,代碼來源:CHLReference.php

示例8: getPropsParams

 protected static function getPropsParams($iblockId)
 {
     $arRes = array();
     $bUseHLIblock = \Bitrix\Main\Loader::includeModule('highloadblock');
     $rsProps = \CIBlockProperty::getList(array('SORT' => 'ASC', 'ID' => 'ASC'), array('IBLOCK_ID' => $iblockId, 'ACTIVE' => 'Y'));
     while ($arProp = $rsProps->fetch()) {
         if ($arProp['PROPERTY_TYPE'] == 'L' || $arProp['PROPERTY_TYPE'] == 'E' || $arProp['PROPERTY_TYPE'] == 'S' && $arProp['USER_TYPE'] == 'directory') {
             if ($arProp['XML_ID'] == 'CML2_LINK') {
                 continue;
             }
             $arValues = array();
             if ($arProp['PROPERTY_TYPE'] == 'L') {
                 $arValues = array();
                 $rsPropEnums = \CIBlockProperty::getPropertyEnum($arProp['ID']);
                 while ($arEnum = $rsPropEnums->fetch()) {
                     $arValues[$arEnum['VALUE']] = array('ID' => $arEnum['ID'], 'NAME' => $arEnum['VALUE'], 'PICT' => false);
                 }
             } elseif ($arProp['PROPERTY_TYPE'] == 'E') {
                 $rsPropEnums = \CIBlockElement::getList(array('SORT' => 'ASC'), array('IBLOCK_ID' => $arProp['LINK_IBLOCK_ID'], 'ACTIVE' => 'Y'), false, false, array('ID', 'NAME', 'PREVIEW_PICTURE'));
                 while ($arEnum = $rsPropEnums->Fetch()) {
                     $arEnum['PREVIEW_PICTURE'] = \CFile::getFileArray($arEnum['PREVIEW_PICTURE']);
                     if (!is_array($arEnum['PREVIEW_PICTURE'])) {
                         $arEnum['PREVIEW_PICTURE'] = false;
                     }
                     if ($arEnum['PREVIEW_PICTURE'] !== false) {
                         $productImg = \CFile::resizeImageGet($arEnum['PREVIEW_PICTURE'], array('width' => 80, 'height' => 80), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
                         $arEnum['PREVIEW_PICTURE']['SRC'] = $productImg['src'];
                     }
                     $arValues[$arEnum['NAME']] = array('ID' => $arEnum['ID'], 'NAME' => $arEnum['NAME'], 'SORT' => $arEnum['SORT'], 'PICT' => $arEnum['PREVIEW_PICTURE']);
                 }
             } elseif ($arProp['PROPERTY_TYPE'] == 'S' && $arProp['USER_TYPE'] == 'directory') {
                 if ($bUseHLIblock) {
                     $hlblock = HL\HighloadBlockTable::getList(array("filter" => array("TABLE_NAME" => $arProp["USER_TYPE_SETTINGS"]["TABLE_NAME"])))->fetch();
                     if ($hlblock) {
                         $entity = HL\HighloadBlockTable::compileEntity($hlblock);
                         $entity_data_class = $entity->getDataClass();
                         $rsData = $entity_data_class::getList();
                         while ($arData = $rsData->fetch()) {
                             $arValues[$arData['UF_XML_ID']] = array('ID' => $arData['ID'], 'NAME' => $arData['UF_NAME'], 'SORT' => $arData['UF_SORT'], 'FILE' => $arData['UF_FILE'], 'PICT' => '', 'XML_ID' => $arData['UF_XML_ID']);
                         }
                     }
                 }
             }
             if (!empty($arValues) && is_array($arValues)) {
                 $arRes[$arProp['ID']] = array('ID' => $arProp['ID'], 'CODE' => $arProp['CODE'], 'NAME' => $arProp['NAME'], 'TYPE' => $arProp['PROPERTY_TYPE'], 'ORDER' => array_keys($arValues), 'VALUES' => $arValues, 'SORT' => $arProp['SORT']);
             }
         }
         if ($arProp['PROPERTY_TYPE'] == "S" && is_array($arRes[$arProp['ID']]['VALUES'])) {
             foreach ($arRes[$arProp['ID']]['VALUES'] as $id => $value) {
                 $arTmpFile = \CFile::getFileArray($value["FILE"]);
                 $tmpImg = \CFile::resizeImageGet($arTmpFile, array('width' => 20, 'height' => 20), BX_RESIZE_IMAGE_PROPORTIONAL, false, false);
                 $arRes[$arProp['ID']]['VALUES'][$id]['PICT'] = $tmpImg['src'];
             }
         }
     }
     return $arRes;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:57,代碼來源:orderbasket.php

示例9: CAdminSorting

    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$APPLICATION->SetTitle(GetMessage('HLBLOCK_ADMIN_MENU_TITLE'));
$sTableID = "tbl_hlblock_entity";
$oSort = new CAdminSorting($sTableID, "NAME", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);
$arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "NAME", "content" => GetMessage('HLBLOCK_ADMIN_ENTITY_TITLE'), "sort" => "NAME", "default" => true));
$lAdmin->AddHeaders($arHeaders);
// menu
if ($_REQUEST["mode"] !== "list") {
    $aMenu = array(array("TEXT" => GetMessage('HLBLOCK_ADMIN_ADD_ENTITY_BUTTON'), "TITLE" => GetMessage('HLBLOCK_ADMIN_ADD_ENTITY_BUTTON'), "LINK" => "highloadblock_entity_edit.php?lang=" . LANGUAGE_ID, "ICON" => "btn_new"));
    $context = new CAdminContextMenu($aMenu);
}
use Bitrix\Highloadblock as HL;
// select data
$rsData = HL\HighloadBlockTable::getList(array("select" => $lAdmin->GetVisibleHeaderColumns(), "order" => array($by => strtoupper($order))));
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// build list
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES")));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row = $lAdmin->AddRow($f_ID, $arRes);
    $can_edit = true;
    $arActions = array();
    $arActions[] = array("ICON" => "list", "TEXT" => GetMessage('HLBLOCK_ADMIN_ROWS_LIST'), "ACTION" => $lAdmin->ActionRedirect("highloadblock_rows_list.php?ENTITY_ID=" . $f_ID), "DEFAULT" => true);
    $arActions[] = array("ICON" => "list", "TEXT" => GetMessage('HLBLOCK_ADMIN_FIELDS_LIST'), "ACTION" => $lAdmin->ActionRedirect("userfield_admin.php?lang=" . LANGUAGE_ID . "&set_filter=Y&find=HLBLOCK_" . intval($f_ID) . "&find_type=ENTITY_ID&back_url=" . urlencode($APPLICATION->GetCurPageParam())));
    $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage($can_edit ? "MAIN_ADMIN_MENU_EDIT" : "MAIN_ADMIN_MENU_VIEW"), "ACTION" => $lAdmin->ActionRedirect("highloadblock_entity_edit.php?ID=" . $f_ID));
    $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessageJS('HLBLOCK_ADMIN_DELETE_ENTITY_CONFIRM') . "')) " . $lAdmin->ActionRedirect("highloadblock_entity_edit.php?action=delete&ID=" . $f_ID . '&' . bitrix_sessid_get()));
    $row->AddActions($arActions);
}
// view
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:31,代碼來源:highloadblock_index.php

示例10: array

<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include.php");
CModule::IncludeModule('iblock');
CModule::IncludeModule('highloadblock');

// Каталог товаров
define('CATALOG_IB', 2);

use Bitrix\Highloadblock as HL;
use Bitrix\Main\Entity;

$filter = array(
	'select' => array('ID', 'NAME', 'TABLE_NAME', 'FIELDS_COUNT'),
	'filter' => array('NAME' => 'UserDiscounts')
);
$hlblock = HL\HighloadBlockTable::getList($filter)->fetch();
if (!empty($hlblock))
{
	$hlblockID = $hlblock['ID'];
	ShowNote('HighloadBlock уже создан!');
}
else
{
	$data = array(
		'NAME' => 'UserDiscounts',
		'TABLE_NAME' => 'custom_user_discounts'
	);
	
	// create
	$result = HL\HighloadBlockTable::add($data);
	$hlblockID = $result->getId();
開發者ID:screate,項目名稱:discount,代碼行數:31,代碼來源:install.php

示例11: _getEntityId

 /**
  * _getEntityId
  * @param $entityName
  * @return bool|string
  * @throws \Exception
  */
 public static function _getEntityId($entityName)
 {
     if (!strlen($entityName)) {
         return false;
     }
     $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();
     $userFieldEntity = sprintf('HLBLOCK_%s', $hlBlockRow['ID']);
     return $userFieldEntity;
 }
開發者ID:cjp2600,項目名稱:bim-core,代碼行數:20,代碼來源:HighloadblockFieldIntegrate.php

示例12: IncludeModuleLangFile

<?php

IncludeModuleLangFile(__FILE__);
if ($USER->IsAdmin()) {
    $items = array();
    CModule::IncludeModule('highloadblock');
    $r = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('order' => array('NAME')));
    while ($row = $r->fetch()) {
        $items[] = array("text" => $row['NAME'], "url" => "highloadblock_rows_list.php?ENTITY_ID=" . $row['ID'] . "&lang=" . LANG, "module_id" => "highloadblock", "more_url" => array("highloadblock_row_edit.php?ENTITY_ID=" . $row['ID'] . "&lang=" . LANG, "highloadblock_entity_edit.php?ID=" . $row['ID'] . "&lang" . LANG));
    }
    return array("parent_menu" => "global_menu_content", "section" => "highloadblock", "sort" => 350, "text" => GetMessage('HLBLOCK_ADMIN_MENU_TITLE'), "url" => "highloadblock_index.php?lang=" . LANGUAGE_ID, "icon" => "highloadblock_menu_icon", "page_icon" => "highloadblock_page_icon", "more_url" => array("highloadblock_entity_edit.php", "highloadblock_rows_list.php", "highloadblock_row_edit.php"), "items_id" => "menu_highloadblock", "items" => $items);
} else {
    return false;
}
開發者ID:spas-viktor,項目名稱:books,代碼行數:14,代碼來源:menu.php

示例13: getEntityFieldsByFilter

	/**
	 * Returns entity data.
	 *
	 * @param string $tableName				HL table name.
	 * @param array $listDescr				Params for getList.
	 * @return array
	 */
	private static function getEntityFieldsByFilter($tableName, $listDescr = array())
	{
		$arResult = array();
		$tableName = (string)$tableName;
		if (!is_array($listDescr))
			$listDescr = array();
		if (!empty($tableName))
		{
			$hlblock = HL\HighloadBlockTable::getList(
				array(
					'select' => array('TABLE_NAME', 'NAME', 'ID'),
					'filter' => array('=TABLE_NAME' => $tableName)
				)
			)->fetch();
			if (isset($hlblock['ID']))
			{
				$entity = HL\HighloadBlockTable::compileEntity($hlblock);
				$entityDataClass = $entity->getDataClass();
				if (!isset(self::$directoryMap[$tableName]))
				{
					self::$directoryMap[$tableName] = $entityDataClass::getEntity()->getFields();
				}

				if (!isset(self::$directoryMap[$tableName]['UF_XML_ID']))
				{
					return $arResult;
				}

				$nameExist = isset(self::$directoryMap[$tableName]['UF_NAME']);
				if (!$nameExist)
					$listDescr['select'] = array('UF_XML_ID', 'ID');
				$fileExists = isset(self::$directoryMap[$tableName]['UF_FILE']);
				if ($fileExists)
					$listDescr['select'][] = 'UF_FILE';

				$sortExist = isset(self::$directoryMap[$tableName]['UF_SORT']);
				$listDescr['order'] = array();
				if ($sortExist)
				{
					$listDescr['order']['UF_SORT'] = 'ASC';
					$listDescr['select'][] = 'UF_SORT';
				}
				if ($nameExist)
					$listDescr['order']['UF_NAME'] = 'ASC';
				else
					$listDescr['order']['UF_XML_ID'] = 'ASC';
				$listDescr['order']['ID'] = 'ASC';

				$rsData = $entityDataClass::getList($listDescr);
				while($arData = $rsData->fetch())
				{
					if (!$nameExist)
						$arData['UF_NAME'] = $arData['UF_XML_ID'];
					$arData['SORT'] = ($sortExist ? $arData['UF_SORT'] : $arData['ID']);
					$arResult[] = $arData;
				}
			}
		}
		return $arResult;
	}
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:67,代碼來源:prop_directory.php

示例14: getTreeProperties

	public static function getTreeProperties($skuInfo, $propertiesCodes, $defaultFields = array())
	{
		$requireFields = array(
			'ID',
			'UF_XML_ID',
			'UF_NAME',
		);

		$result = array();
		if (empty($skuInfo))
			return $result;
		if (!is_array($skuInfo))
		{
			$skuInfo = (int)$skuInfo;
			if ($skuInfo <= 0)
				return $result;
			if (self::$catalogIncluded === null)
				self::$catalogIncluded = Loader::includeModule('catalog');
			if (!self::$catalogIncluded)
				return $result;
			$skuInfo = CCatalogSKU::GetInfoByProductIBlock($skuInfo);
			if (empty($skuInfo))
				return $result;
		}
		if (empty($propertiesCodes) || !is_array($propertiesCodes))
			return $result;

		$showMode = '';

		$propertyIterator = PropertyTable::getList(array(
			'select' => array(
				'ID', 'IBLOCK_ID', 'CODE', 'NAME', 'SORT', 'LINK_IBLOCK_ID', 'PROPERTY_TYPE', 'USER_TYPE', 'USER_TYPE_SETTINGS'
			),
			'filter' => array(
				'IBLOCK_ID' => $skuInfo['IBLOCK_ID'],
				'PROPERTY_TYPE' => array(
					PropertyTable::TYPE_LIST,
					PropertyTable::TYPE_ELEMENT,
					PropertyTable::TYPE_STRING
				),
				'ACTIVE' => 'Y', 'MULTIPLE' => 'N'
			),
			'order' => array(
				'SORT' => 'ASC', 'ID' => 'ASC'
			)
		));
		while ($propInfo = $propertyIterator->fetch())
		{
			$propInfo['ID'] = (int)$propInfo['ID'];
			if ($propInfo['ID'] == $skuInfo['SKU_PROPERTY_ID'])
				continue;
			$propInfo['CODE'] = (string)$propInfo['CODE'];
			if ($propInfo['CODE'] === '')
				$propInfo['CODE'] = $propInfo['ID'];
			if (!in_array($propInfo['CODE'], $propertiesCodes))
				continue;
			$propInfo['SORT'] = (int)$propInfo['SORT'];
			$propInfo['USER_TYPE'] = (string)$propInfo['USER_TYPE'];
			if ($propInfo['PROPERTY_TYPE'] == PropertyTable::TYPE_STRING)
			{
				if ('directory' != $propInfo['USER_TYPE'])
					continue;
				$propInfo['USER_TYPE_SETTINGS'] = (string)$propInfo['USER_TYPE_SETTINGS'];
				if ($propInfo['USER_TYPE_SETTINGS'] == '')
					continue;
				$propInfo['USER_TYPE_SETTINGS'] = unserialize($propInfo['USER_TYPE_SETTINGS']);
				if (!isset($propInfo['USER_TYPE_SETTINGS']['TABLE_NAME']) || empty($propInfo['USER_TYPE_SETTINGS']['TABLE_NAME']))
					continue;
				if (self::$highLoadInclude === null)
					self::$highLoadInclude = Loader::includeModule('highloadblock');
				if (!self::$highLoadInclude)
					continue;

				$highBlock = HighloadBlockTable::getList(array(
					'filter' => array('TABLE_NAME' => $propInfo['USER_TYPE_SETTINGS']['TABLE_NAME'])
				))->fetch();
				if (!isset($highBlock['ID']))
					continue;

				$entity = HighloadBlockTable::compileEntity($highBlock);
				$entityDataClass = $entity->getDataClass();
				$fieldsList = $entityDataClass::getEntity()->getFields();
				if (empty($fieldsList))
					continue;

				$flag = true;
				foreach ($requireFields as &$fieldCode)
				{
					if (!isset($fieldsList[$fieldCode]) || empty($fieldsList[$fieldCode]))
					{
						$flag = false;
						break;
					}
				}
				unset($fieldCode);
				if (!$flag)
					continue;
				$propInfo['USER_TYPE_SETTINGS']['FIELDS_MAP'] = $fieldsList;
				$propInfo['USER_TYPE_SETTINGS']['ENTITY'] = $entity;
			}
//.........這裏部分代碼省略.........
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:101,代碼來源:comp_pricetools.php

示例15: getNumberCabinet

function getNumberCabinet($idCabinet, $relativePath)
{
    $numberCabinet = '';
    $obCache = new CPHPCache();
    $cache_id = SITE_ID . '|tickets|numbersCabinets|' . $idCabinet;
    $cache_path = '/' . SITE_ID . $relativePath;
    if ($obCache->StartDataCache(36000, $cache_id, $cache_path)) {
        $rsCabinetData = \Bitrix\Highloadblock\HighloadBlockTable::getList(array('filter' => array('NAME' => 'Cabinet')));
        if ($arCabinetData = $rsCabinetData->fetch()) {
            $EntityCabinet = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($arCabinetData);
            $QueryCabinet = new \Bitrix\Main\Entity\Query($EntityCabinet);
            $QueryCabinet->setSelect(array('UF_NUMBER'));
            $QueryCabinet->setFilter(array('ID' => $idCabinet));
            $resultCabinet = $QueryCabinet->exec();
            $resultCabinet = new CDBResult($resultCabinet);
            $rowCabinet = $resultCabinet->Fetch();
            $numberCabinet = $rowCabinet['UF_NUMBER'];
        }
        $obCache->EndDataCache(array("numberCabinet" => $numberCabinet));
    } else {
        $arVars = $obCache->GetVars();
        $numberCabinet = $arVars["numberCabinet"];
    }
    return $numberCabinet;
}
開發者ID:bereza-evgenij,項目名稱:1bit,代碼行數:25,代碼來源:component.php


注:本文中的Bitrix\Highloadblock\HighloadBlockTable::getList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。