Documentation

getMetadataAndHtmlByUrl

array|false public static
\Bitrix\Main\UrlPreview\UrlPreview::getMetadataAndHtmlByUrl(
 string $url,
 boolean $addIfNew = true
);

Static method. When URL is remote, it returns metadata for it. When URL is local, checks user for access to entity and returns the rich link.

Parameters

ParameterDescriptionVersion
$urlDocument URL.
$addIfNewDefines, if method must select and save metadata for a document, if it is not available in database.

Example



© «Bitrix24», 2001-2024
Up