21 "USER_TYPE_ID" =>
"url_preview",
22 "CLASS_NAME" => __CLASS__,
36 $connection = \Bitrix\Main\Application::getConnection();
37 $helper = $connection->getSqlHelper();
144 $value = (int)$value;
149 $metadata = UrlMetadataTable::getById($value)->fetch();
150 if(!is_array($metadata))
153 "id" => $userField[
"FIELD_NAME"],
154 "text" => GetMessage(
"MAIN_URL_PREVIEW_VALUE_NOT_FOUND")
161 "id" => $userField[
"FIELD_NAME"],
162 "text" => GetMessage(
"MAIN_URL_PREVIEW_VALUE_NO_ACCESS",
163 array(
'#URL#' => $metadata[
'URL'])
182 if(strpos($value,
';') !==
false)
184 list($value, $imageUrl) = explode(
';', $value);
196 $metadata = UrlMetadataTable::getById($value)->fetch();
197 if(!is_array($metadata))
202 if($imageUrl && is_array($metadata[
'EXTRA'][
'IMAGES']) && in_array($imageUrl, $metadata[
'EXTRA'][
'IMAGES']))
static loadMessages($file)
static getMessage($code, $replace=null, $language=null)
static showView($userField, $userFieldParams, &$cacheTag, $edit=false)
static checkDynamicPreviewAccess($url, $userId=0)
static showEdit($userField, $userFieldParams)
static setMetadataImage($id, $imageUrl)
static getUserTypeDescription()
static getSettingsHTML($userField, $htmlControl, $varsFromForm)
static getFilterHTML($userField, $htmlControl)
static checkfields($userField, $value)
static getAdminListEditHTMLMulty($userField, $htmlControl)
static onBeforeSave($userField, $value)
static getAdminListEditHTML($userField, $htmlControl)
static getDBColumnType($userField)
static getAdminListViewHTML($userField, $htmlControl)
static getEditFormHTML($userField, $htmlControl)
static getPublicViewHTML($userField, $id, $params="", $settings=array())
static prepareSettings($userField)