Created
August 3, 2018 08:42
-
-
Save Pum-purum/f071d4cc6d07e15356031297da4604bb to your computer and use it in GitHub Desktop.
Получение ID свойства типа список по его XML_ID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPropertyEnumIdByXmlId($iBlockID, $xmlId) | |
{ | |
$property_enums = CIBlockPropertyEnum::GetList(Array(), Array("IBLOCK_ID" => $iBlockID, "XML_ID" => $xmlId)); | |
if ($enum_fields = $property_enums->GetNext()) { | |
return $enum_fields["ID"]; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment