isUniqueSectionCode
CIBlock::isUniqueSectionCode(
int $id
): bool;
Method verifies, if the unique section code requirement is enabled. Static method.
Call parameters
Parameter | Description |
---|---|
$id | Iblock ID (int type). |
Returned value
Returns true, when field settings Symbolic code (CODE) has a set parameter "Check uniqueness if the code is specified". Otherwise returns false.
Returns false for negative values. For non-existent iblocks, result depends on data returned by the method CIBlock::GetFieldsDefaults (field settings by default).
Example
<?
$id = 10; if (CIBlock::isUniqueSectionCode($id)) { echo 'For iblock with code '.$id.' has enabled section code uniqueness check'; }
?>
© «Bitrix24», 2001-2024