Documentation

GetSearchContent

string
CIBlockProperty*::GetSearchContent(
array arProperty,
array value,
array strHTMLControlName
);

The method returns property value to be displayed in search module. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Note: called when indexing iblock elements by the search module. In case this method is not defined for this property, the method GetPublicViewHTML is called, if available. Its result is entered into the search index after HTML markup is deleted.

Call parameters

Parameter Description
arProperty
Property metadata. See Structure for Iblock Module Tables
valueProperty value. Array type:
array(
"VALUE" => value,
);
strHTMLControlNameEmpty array.

Returned value

String.

See Also

Examples

<?
class CIBlockPropertyMyDateTime
{
function GetSearchContent($arProperty, $value, $strHTMLControlName)
{
if(strlen($value["VALUE"])>0)
return $value["VALUE"];
else
return '';
}
}
?>


© «Bitrix24», 2001-2022
Up