GetDocumentFields
array
IBPWorkflowDocument::GetDocumentFields( mixed documentType
);
This method returns an array of properties (fields) that this document type has. The GetDocument method returns property values for the specified document. Returned array is presented as follows
array(
code_property => array(
"NAME" => name_property,
"TYPE" => type_property
),
...
)
Method parameters
Parameter | Description |
---|---|
documentType | Document type ID |
Examples
<?
public function GetDocumentFields($documentType)
{
$iblockId = intval(substr($documentType, strlen("iblock_")));
if ($iblockId <= 0)
throw new CBPArgumentOutOfRangeException("documentType", $documentType);
$arResult = array(
"ID" => array(
"Name" => GetMessage("IBD_FIELD_ID"),
"Type" => "int",
"Filterable" => true,
"Editable" => false,
"Required" => false,
"Multiple" => false,
),
"TIMESTAMP_X" => array(
"Name" => GetMessage("IBD_FIELD_TIMESTAMP_X"),
"Type" => "datetime",
"Filterable" => true,
"Editable" => true,
"Required" => false,
"Multiple" => false,
),
...
);
return $arResult;
}
?>
© «Bitrix24», 2001-2024