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


PHP CIBlockPropertyEnum::GetList方法代码示例

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


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

示例1: _getPropertiesEx

function _getPropertiesEx($arParams)
{
    $arFilter = array();
    $arProperties = array();
    $arPropListIds = array();
    if (notEmpty($arParams["type"])) {
        $arFilter["PROPERTY_TYPE"] = $arParams["type"];
    }
    if (notEmpty($arParams["iblock_id"])) {
        $arFilter["IBLOCK_ID"] = iblock($arParams["iblock_id"]);
    }
    $resProperties = \CIBlockProperty::GetList(array(), $arFilter);
    while ($arProperty = $resProperties->Fetch()) {
        $arProperties[$arProperty["CODE"]] = $arProperty;
        if ($arProperty["PROPERTY_TYPE"] == "L") {
            $arPropListIds[] = $arProperty["ID"];
        }
    }
    // В фильтр CIBlockPropertyEnum::GetList() нельзя передать
    // PROPERTY_ID в виде массива ID, поэтому перебираем
    // каждое свойство в цикле
    foreach ($arPropListIds as $propListId) {
        $resPropValues = \CIBlockPropertyEnum::GetList(array('SORT' => 'ASC', 'VALUE' => 'ASC'), array('PROPERTY_ID' => $propListId));
        while ($arPropValue = $resPropValues->Fetch()) {
            $arProperties[$arPropValue["PROPERTY_CODE"]]["VALUES"][$arPropValue["XML_ID"]] = $arPropValue["ID"];
        }
    }
    return $arProperties;
}
开发者ID:rschweppes,项目名称:bitrix-helpers,代码行数:29,代码来源:getproperties.php

示例2: generateAddCode

 /**
  * Генерация создания Информационного блока
  *
  * generateAddCode
  * @param array $IblockCode
  * @return bool|string
  */
 public function generateAddCode($IblockCode)
 {
     $return = array();
     $iblockObject = $this->iblock->GetList(array(), array('CODE' => $IblockCode, 'CHECK_PERMISSIONS' => 'N'));
     if ($item = $iblockObject->Fetch()) {
         # Установка групп пользователей
         $this->setUserGroupId($item['ID'], $item);
         $item['FIELDS'] = \CIBlock::GetFields($item['ID']);
         Helper::unsetFields(array('ID'), $item);
         if ($return[] = $this->getMethodContent('Bim\\Db\\Iblock\\IblockIntegrate', 'Add', array($item))) {
             $IblockProperty = new \CIBlockProperty();
             $iblockPropertyQuery = $IblockProperty->GetList(array(), array('IBLOCK_CODE' => $item['CODE']));
             while ($iblockProperty = $iblockPropertyQuery->Fetch()) {
                 Helper::unsetFields(array('ID'), $iblockProperty);
                 $iblockProperty['IBLOCK_CODE'] = $item['CODE'];
                 $propertyQuery = \CIBlockPropertyEnum::GetList(array(), array("IBLOCK_ID" => $iblockProperty['IBLOCK_ID'], "CODE" => $iblockProperty['CODE']));
                 while ($propertyValues = $propertyQuery->Fetch()) {
                     Helper::unsetFields(array('ID', 'PROPERTY_ID'), $propertyValues);
                     $iblockProperty['VALUES'][] = $propertyValues;
                 }
                 if (!is_null($iblockProperty['LINK_IBLOCK_ID'])) {
                     $linkedIBlock = $this->iblock->GetList(array(), array('ID' => $iblockProperty['LINK_IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N'))->Fetch();
                     $iblockProperty['LINK_IBLOCK_CODE'] = $linkedIBlock['CODE'];
                 }
                 $return[] = $this->getMethodContent('Bim\\Db\\Iblock\\IblockPropertyIntegrate', 'Add', array($iblockProperty));
             }
             return implode(PHP_EOL, $return);
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:cjp2600,项目名称:bim-core,代码行数:41,代码来源:Iblock.php

示例3: storeResult

function storeResult($arResult, $arParams) {
    $iblock = CIBlock::GetList(
        array(),
        array(
            'TYPE' => $arParams['IBLOCK_TYPE'],
            'CODE' => $arParams['IBLOCK_CODE'],
        )
    );
    $iblock = $iblock->Fetch();
    
    $el = new CIBlockElement;

    $props = array();
    foreach ($arResult['FIELDS_LIST'] as $arField) {
        if ($arField['FIELD_TYPE'] == 'TEXT' || $arField['FIELD_TYPE'] == 'NUMBER') {
            $props[$arField['CODE']] = array(
                'VALUE' => $arResult['POST_DATA']['~'.$arField['CODE']],
            );
        } elseif ($arField['FIELD_TYPE'] == 'TEXTAREA') {
            $props[$arField['CODE']] = array(
                'VALUE' => array(
                    'TYPE' => 'text',
                    'TEXT' => $arResult['POST_DATA']['~'.$arField['CODE']],
                ),
            );
        } elseif ($arField['FIELD_TYPE'] == 'LIST') {
            $propEnum = CIBlockPropertyEnum::GetList(
                array(),
                array(
                    'XML_ID' => $arResult['POST_DATA']['~'.$arField['CODE']],
                    'CODE' => $arField['CODE'],
                    'IBLOCK_ID' => $iblock['ID'],
                )
            );
            $propEnum = $propEnum->Fetch();
            if ( ! $propEnum) return false;

            $props[$arField['CODE']] = array(
                'VALUE' => $propEnum['ID'],
            );
        }
    }

    $res = $el->Add(array(
        'IBLOCK_TYPE' => $arParams['IBLOCK_TYPE'],
        'IBLOCK_ID' => $iblock['ID'],
        'ACTIVE' => 'Y',
        'PROPERTY_VALUES' => $props,
        'ACTIVE_FROM' => ConvertTimeStamp(time()+CTimeZone::GetOffset(), 'FULL'),
        'NAME' => 'Form result', # !!! NEED TO REPLACE TO DEFAULT VALUE
    ));

    if (!$res) {
        return array(
            'MESSAGE' => $el->LAST_ERROR,
        );
    }

    return true;
}
开发者ID:ASDAFF,项目名称:bitrix-advanced-form,代码行数:60,代码来源:store_result.php

示例4: generateAddCode

 /**
  * Генерация создания
  *
  * generateAddCode
  * @param array $IblockTypeId
  * @return bool|string
  */
 public function generateAddCode($IblockTypeId)
 {
     $iBlock = new \CIBlock();
     $CIblockType = new \CIBlockType();
     $lang = new \CLanguage();
     $return = array();
     $dbIblockType = $CIblockType->GetByID($IblockTypeId);
     if ($arIblockType = $dbIblockType->GetNext()) {
         $Iblock = new \CIBlock();
         $dbIblock = $Iblock->GetList(array(), array('TYPE' => $IblockTypeId, 'CHECK_PERMISSIONS' => 'N'));
         while ($arIblock = $dbIblock->GetNext()) {
             $IblockProperty = new \CIBlockProperty();
             $dbIblockProperty = $IblockProperty->GetList(array(), array('IBLOCK_CODE' => $arIblock['CODE'], 'CHECK_PERMISSIONS' => 'N'));
             while ($arIblockProperty = $dbIblockProperty->GetNext()) {
                 $dbPropertyValues = \CIBlockPropertyEnum::GetList(array(), array("IBLOCK_ID" => $arIblockProperty['IBLOCK_ID'], "CODE" => $arIblockProperty['CODE']));
                 while ($arPropertyValues = $dbPropertyValues->Fetch()) {
                     $arIblockProperty['VALUES'][$arPropertyValues['ID']] = $arPropertyValues;
                 }
                 Helper::unsetFields(array('ID', '~ID', 'IBLOCK_ID', '~IBLOCK_ID'), $arIblockProperty);
                 $arIblockProperty['IBLOCK_CODE'] = $arIblock['CODE'];
                 foreach ($arIblockProperty as $k => $v) {
                     if (strstr($k, "~") || is_null($v)) {
                         unset($arIblockProperty[$k]);
                     }
                 }
                 if (isset($arIblockProperty['LINK_IBLOCK_ID'])) {
                     $res = $iBlock->GetList(array(), array("ID" => $arIblockProperty['LINK_IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N'));
                     if ($ar_res = $res->GetNext()) {
                         unset($arIblockProperty['LINK_IBLOCK_ID']);
                         $arIblockProperty['LINK_IBLOCK_CODE'] = $ar_res['CODE'];
                     }
                 }
                 $return[] = $this->getMethodContent('Bim\\Db\\Iblock\\IblockPropertyIntegrate', 'Add', array($arIblockProperty));
             }
             foreach ($arIblock as $k => $v) {
                 if (strstr($k, "~") || $k == 'ID') {
                     unset($arIblock[$k]);
                 }
             }
             $return[] = $this->getMethodContent('Bim\\Db\\Iblock\\IblockIntegrate', 'Add', array($arIblock));
         }
         foreach ($arIblockType as $k => $v) {
             if (strstr($k, "~") || is_null($v)) {
                 unset($arIblockType[$k]);
             }
         }
         $rsLang = $lang->GetList($by = "lid", $order = "desc");
         while ($arLang = $rsLang->Fetch()) {
             $arTypeLang = $CIblockType->GetByIDLang($IblockTypeId, $arLang['LID']);
             $arIblockType["LANG"][$arLang['LID']] = array('NAME' => $arTypeLang['NAME'], 'SECTION_NAME' => $arTypeLang['SECTION_NAME'], 'ELEMENT_NAME' => $arTypeLang['ELEMENT_NAME']);
         }
         $return[] = $this->getMethodContent('Bim\\Db\\Iblock\\IblockTypeIntegrate', 'Add', array($arIblockType));
         $return = array_reverse($return);
         return implode(PHP_EOL, $return);
     } else {
         return false;
     }
 }
开发者ID:cjp2600,项目名称:bim-core,代码行数:65,代码来源:IblockType.php

示例5: getItemsFlagsIds

 static function getItemsFlagsIds($code, $iblockId = IBLOCK_CATALOG)
 {
     $flagsIds = array();
     $flagsDb = \CIBlockPropertyEnum::GetList(array('id' => 'asc'), array('IBLOCK_ID' => $iblockId, 'CODE' => $code));
     while ($flags = $flagsDb->GetNext()) {
         $flagsIds[$flags['XML_ID']] = $flags['ID'];
     }
     return $flagsIds;
 }
开发者ID:AlexSmerw,项目名称:domino,代码行数:9,代码来源:Registry.class.php

示例6: getEnumItemList

 /**
  * getEnumItemList
  * @param $iblockId
  * @param $iblockPropId
  * @return array
  */
 private function getEnumItemList($iblockId, $iblockPropId)
 {
     $result = array();
     $propEnumDbRes = \CIBlockPropertyEnum::GetList(array('SORT' => 'ASC'), array('IBLOCK_ID' => $iblockId, 'PROPERTY_ID' => $iblockPropId));
     if ($propEnumDbRes !== false && $propEnumDbRes->SelectedRowsCount()) {
         $index = 0;
         while ($propEnum = $propEnumDbRes->Fetch()) {
             $result[$index] = array('ID' => $index, 'VALUE' => $propEnum['VALUE'], 'XML_ID' => $propEnum['XML_ID'], 'SORT' => $propEnum['SORT'], 'DEF' => $propEnum['DEF']);
             $index++;
         }
     }
     return $result;
 }
开发者ID:cjp2600,项目名称:bim-core,代码行数:19,代码来源:IblockProperty.php

示例7: addElementReview

function addElementReview($arResult, $ID_SECTION, $IBLOCK_ID)
{
    CModule::IncludeModule('iblock');
    $property_enums = CIBlockPropertyEnum::GetList(array("DEF" => "DESC", "SORT" => "ASC"), array("IBLOCK_ID" => $IBLOCK_ID, "CODE" => "RATING", "VALUE" => $arResult['RATING']));
    while ($rating = $property_enums->GetNext()) {
        $arRating = $rating["ID"];
    }
    $current_date = dateActiveFrom(date('d.m.Y'));
    $NAME = $current_date . ' ' . $arResult['NAME'];
    $arFields = array("ACTIVE" => "N", "IBLOCK_ID" => $IBLOCK_ID, "IBLOCK_SECTION_ID" => $ID_SECTION, "NAME" => $NAME, "DETAIL_TEXT" => "Описание элемента", "PROPERTY_VALUES" => array("NAME" => $arResult['NAME'], "EMAIL" => $arResult['EMAIL'], "RATING" => array('VALUE' => $arRating), "BENEFITS" => $arResult['BENEFITS'], "DISADVANTAGES" => $arResult['DISADVANTAGES'], "COMMENT" => $arResult['COMMENT']));
    $oElement = new CIBlockElement();
    $idElement = $oElement->Add($arFields, false, false, true);
    return $idElement;
}
开发者ID:CheBurashka334,项目名称:zakrepi,代码行数:14,代码来源:add_comment.php

示例8: getById

 /**
  * Возвращает список всех вариантов для указанного свойства
  * @param int $propertyId
  * @return array
  */
 public static function getById($id)
 {
     if (!isset(self::$_items[$id])) {
         if (!\CModule::IncludeModule('iblock')) {
             throw new \bxar\Exception('Iblock module is not installed');
         }
         self::$_items[$id] = array();
         $res = \CIBlockPropertyEnum::GetList(array('SORT' => 'ASC', 'VALUE' => 'ASC'), array('PROPERTY_ID' => $id));
         while ($ob = $res->GetNext()) {
             self::$_items[$id][] = $ob;
         }
     }
     return self::$_items[$id];
 }
开发者ID:marvin255,项目名称:bxar,代码行数:19,代码来源:Enum.php

示例9: GetFilterData

 private function GetFilterData($IBLOCK_ID, $arFields = array())
 {
     $filter_name = $this->sk_filter_name;
     global ${$filter_name};
     $arPROPERTIES = array();
     foreach ($arFields as $i => $PROP_ID) {
         $arSort = array();
         $arFilter = array("ACTIVE" => "Y", "IBLOCK_ID" => $IBLOCK_ID);
         if (intval($PROP_ID) > 0) {
             $arFilter["ID"] = $PROP_ID;
         } else {
             $arFilter["CODE"] = $PROP_ID;
         }
         $properties = CIBlockProperty::GetList($arSort, $arFilter);
         while ($prop_fields = $properties->GetNext()) {
             switch ($prop_fields["PROPERTY_TYPE"]) {
                 case "L":
                     $PROP_ENUM_VALUES = array();
                     $arPropSort = array("value" => "asc");
                     $arPropFilter = array("PROPERTY_ID" => $prop_fields["ID"], "IBLOCK_ID" => $IBLOCK_ID);
                     $prop_enums = CIBlockPropertyEnum::GetList($arPropSort, $arPropFilter);
                     while ($enum_fields = $prop_enums->GetNext()) {
                         $PROP_ENUM_VALUES[] = $enum_fields;
                     }
                     $prop_fields["VALUES"] = $PROP_ENUM_VALUES;
                     break;
                 case "E":
                     $PROP_ENUM_VALUES = array();
                     $arPropSort = array("NAME" => "asc");
                     $arPropFilter = array("ACTIVE" => "Y", "IBLOCK_ID" => $prop_fields["LINK_IBLOCK_ID"]);
                     $arSelFields = array("IBLOCK_ID", "ID", "NAME", "PROPERTY_*");
                     $db_vals = CIBlockElement::GetList($arPropSort, $arPropFilter, false, false, $arSelFields);
                     while ($obElement = $db_vals->GetNextElement()) {
                         $tmp = array();
                         $tmp = $obElement->GetFields();
                         $tmp["PROPERTIES"] = $obElement->GetProperties();
                         $PROP_ENUM_VALUES[$tmp["ID"]] = $tmp;
                     }
                     $prop_fields["VALUES"] = $PROP_ENUM_VALUES;
                     break;
             }
             $arPROPERTIES[$prop_fields["ID"]] = $prop_fields;
         }
     }
     // //  print_r( $arPROPERTIES );
     return $arPROPERTIES;
 }
开发者ID:raffiz,项目名称:my_home_tests,代码行数:47,代码来源:interface.php

示例10: getPropertyIblock

	/**
	 * [getPropertyIblock description]
	 * @return array all products on iblock
	 */
	protected function getPropertyIblock(){
		if (!CModule::IncludeModule("iblock")):
			return false;
		endif;
		$properties = CIBlockProperty::GetList(Array("sort"=>"asc", "name"=>"asc"), Array("ACTIVE"=>"Y", "IBLOCK_ID"=>$this->getIblockId()));
		while ($prop_fields = $properties->GetNext())
		{
			if ($prop_fields["PROPERTY_TYPE"] == "L"):
				$property_enums = CIBlockPropertyEnum::GetList(Array("DEF"=>"DESC", "SORT"=>"ASC"), Array("IBLOCK_ID"=>$this->getIblockId(), "CODE"=>$prop_fields["CODE"]));
				while($enum_fields = $property_enums->GetNext())
				{
				  	$prop_fields["ENUM_LIST"][] = $enum_fields;
				}
			endif;
			$arProperties[] = $prop_fields;
		}
		return $arProperties;
	}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:22,代码来源:addProducts.php

示例11: findCode

 function findCode($id, $val)
 {
     if (CModule::IncludeModule("iblock")) {
         $properties = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", 'ID' => $id));
         while ($prop_fields = $properties->GetNext()) {
             $temp['CODE'] = $prop_fields['CODE'];
             if ($prop_fields['PROPERTY_TYPE'] == 'L') {
                 $property_enums = CIBlockPropertyEnum::GetList(array("DEF" => "DESC", "SORT" => "ASC"), array("CODE" => $prop_fields['CODE'], 'ID' => $val));
                 while ($enum_fields = $property_enums->GetNext()) {
                     $temp['VALUE'] = $enum_fields["VALUE"];
                 }
             }
         }
         return $temp;
     } else {
         return false;
     }
 }
开发者ID:sharapudinov,项目名称:lovestore.top,代码行数:18,代码来源:functions.php

示例12: GetEditFormHTML

    function GetEditFormHTML($arUserField, $arHtmlControl)
    {
        $return = '';
        if (CModule::IncludeModule("iblock")) {
            $resdb = CIBlockPropertyEnum::GetList(array("SORT" => "ASC", "VALUE" => "ASC"), array("ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CATALOG, 'PROPERTY_ID' => PROPERTY_ID_TORGOVAYA_MARKA));
            $arPropertyListValue = array();
            while ($res = $resdb->fetch()) {
                $arPropertyListValue[$res['ID']] = $res['VALUE'];
            }
            if (count($arPropertyListValue) > 0) {
                ob_start();
                ?>
	            <select name="<?php 
                echo $arUserField["FIELD_NAME"];
                ?>
">
	                <option value=""></option>
	                <?php 
                foreach ($arPropertyListValue as $ID => $NAME) {
                    ?>
	                    <option value="<?php 
                    echo $ID;
                    ?>
" <?php 
                    if ($ID == $arUserField["VALUE"]) {
                        echo 'selected';
                    }
                    ?>
><?php 
                    echo $NAME;
                    ?>
</option>
	                <?php 
                }
                ?>
	            </select>
	        <?php 
                $return = ob_get_contents();
                ob_end_clean();
            }
        }
        return $return;
    }
开发者ID:VitaliiSestrenskyi,项目名称:sest,代码行数:43,代码来源:AddNewCUserProperty.php

示例13: fillItemValues

	public function fillItemValues(&$resultItem, $arProperty)
	{
		static $cacheL = array();
		static $cacheE = array();
		static $cacheG = array();

		if(is_array($arProperty))
		{
			if(isset($arProperty["PRICE"]))
			{
				return null;
			}
			$key = $arProperty["VALUE"];
			$PROPERTY_TYPE = $arProperty["PROPERTY_TYPE"];
			$PROPERTY_ID = $arProperty["ID"];
		}
		else
		{
			$key = $arProperty;
			$PROPERTY_TYPE = $resultItem["PROPERTY_TYPE"];
			$PROPERTY_ID = $resultItem["ID"];
		}

		if($PROPERTY_TYPE == "F")
		{
			return null;
		}
		elseif($PROPERTY_TYPE == "N")
		{
			if(!isset($resultItem["VALUES"]["MIN"]) || !array_key_exists("VALUE", $resultItem["VALUES"]["MIN"]) || doubleval($resultItem["VALUES"]["MIN"]["VALUE"]) > doubleval($key))
				$resultItem["VALUES"]["MIN"]["VALUE"] = $key;

			if(!isset($resultItem["VALUES"]["MAX"]) || !array_key_exists("VALUE", $resultItem["VALUES"]["MAX"]) || doubleval($resultItem["VALUES"]["MAX"]["VALUE"]) < doubleval($key))
				$resultItem["VALUES"]["MAX"]["VALUE"] = $key;

			return null;
		}
		elseif($PROPERTY_TYPE == "E" && $key <= 0)
		{
			return null;
		}
		elseif($PROPERTY_TYPE == "G" && $key <= 0)
		{
			return null;
		}
		elseif(strlen($key) <= 0)
		{
			return null;
		}

		switch($PROPERTY_TYPE)
		{
		case "L":
			if(!isset($cacheL[$PROPERTY_ID]))
			{
				$cacheL[$PROPERTY_ID] = array();
				$rsEnum = CIBlockPropertyEnum::GetList(array("SORT"=>"ASC", "VALUE"=>"ASC"), array("PROPERTY_ID" => $PROPERTY_ID));
				while ($enum = $rsEnum->Fetch())
					$cacheL[$PROPERTY_ID][$enum["ID"]] = $enum;
			}
			$sort = $cacheL[$PROPERTY_ID][$key]["SORT"];
			$value = $cacheL[$PROPERTY_ID][$key]["VALUE"];
			break;
		case "E":
			if(!isset($cacheE[$key]))
			{
				$arLinkFilter = array (
					"ID" => $key,
					"ACTIVE" => "Y",
					"ACTIVE_DATE" => "Y",
					"CHECK_PERMISSIONS" => "Y",
				);
				$rsLink = CIBlockElement::GetList(array(), $arLinkFilter, false, false, array("ID","IBLOCK_ID","NAME","SORT"));
				$cacheE[$key] = $rsLink->Fetch();
			}
			$value = $cacheE[$key]["NAME"];
			$sort = $cacheE[$key]["SORT"];
			break;
		case "G":
			if(!isset($cacheG[$key]))
			{
				$arLinkFilter = array (
					"ID" => $key,
					"GLOBAL_ACTIVE" => "Y",
					"CHECK_PERMISSIONS" => "Y",
				);
				$rsLink = CIBlockSection::GetList(array(), $arLinkFilter, false, array("ID","IBLOCK_ID","NAME","LEFT_MARGIN","DEPTH_LEVEL"));
				$cacheG[$key] = $rsLink->Fetch();
			}
			$value = str_repeat(".", $cacheG["DEPTH_LEVEL"]).$cacheG[$key]["NAME"];
			$sort = $cacheG[$key]["LEFT_MARGIN"];
			break;
		default:
			$value = $key;
			$sort = 0;
			break;
		}

		$key = htmlspecialcharsbx($key);
		$value = htmlspecialcharsex($value);
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:101,代码来源:class.php

示例14: GetMessage

        ?>
				</td>
			</tr>
			<tr valign="bottom">
				<td>
					<div style="font-size:14px;font-weight:bold;padding-bottom:8px"><label for="ABSENCE_TYPE"><?php 
        echo GetMessage("INTR_ABSENCE_TYPE");
        ?>
</label></div>
					<select name="ABSENCE_TYPE" id="absence_type" style="width:100%;font-size:14px;border:1px #c8c8c8 solid;">
						<option value="0"><?php 
        echo GetMessage("INTR_ABSENCE_NO_TYPE");
        ?>
</option>
						<?php 
        $property_enums = CIBlockPropertyEnum::GetList(array("DEF" => "DESC", "SORT" => "ASC"), array("IBLOCK_ID" => $iblockID, "CODE" => "ABSENCE_TYPE"));
        while ($enum_fields = $property_enums->Fetch()) {
            ?>
<option value="<?php 
            echo $enum_fields["ID"];
            ?>
" <?php 
            if (isset($_POST['ABSENCE_TYPE']) && $_POST['ABSENCE_TYPE'] == $enum_fields["ID"] || isset($arElement["PROPERTY_ABSENCE_TYPE_ENUM_ID"]) && $arElement["PROPERTY_ABSENCE_TYPE_ENUM_ID"] == $enum_fields["ID"]) {
                echo "selected";
            }
            ?>
><?php 
            echo $enum_fields["VALUE"];
            ?>
</option><?php 
        }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:absence.php

示例15: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== TRUE) {
    die;
}
$arResult["CLUB_LIST"] = Club::getListModerator();
$property_enums = CIBlockPropertyEnum::GetList(array("SORT" => "ASC"), array("IBLOCK_ID" => IB_CLUB_ID, "CODE" => "KIND_CLUB"));
while ($enum_fields = $property_enums->GetNext()) {
    $arResult["KIND_CLUB_LIST"][] = $enum_fields;
}
$property_enums = CIBlockPropertyEnum::GetList(array("SORT" => "ASC"), array("IBLOCK_ID" => IB_CLUB_ID, "CODE" => "MUSIC"));
while ($enum_fields = $property_enums->GetNext()) {
    $arResult["MUSIC_LIST"][] = $enum_fields;
}
$this->IncludeComponentTemplate();
开发者ID:nProfessor,项目名称:Mytb,代码行数:15,代码来源:component.php


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