Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
urlmetadatahandler.php
1<?php
2namespace Bitrix\Main\Replica;
3
5
6if (Loader::includeModule('replica'))
7{
8 class UrlMetadataHandler extends \Bitrix\Replica\Client\BaseHandler
9 {
10 protected $tableName = "b_urlpreview_metadata";
11 protected $moduleId = "main";
12 protected $className = "\\Bitrix\\Main\\UrlPreview\\UrlMetadataTable";
13 protected $primary = array(
14 "ID" => "auto_increment",
15 );
16 protected $predicates = array();
17 protected $translation = array(
18 "IMAGE_ID" => "b_file.ID",
19 );
20 protected $fields = array(
21 "DATE_INSERT" => "datetime",
22 "DATE_EXPIRE" => "datetime",
23 "TITLE" => "text",
24 "DESCRIPTION" => "text",
25 "SITE_NAME" => "text",
26 );
27
34 public function beforeLogInsert(array $record)
35 {
36 if ($record["TYPE"] === \Bitrix\Main\UrlPreview\UrlMetadataTable::TYPE_DYNAMIC)
37 {
38 return false;
39 }
40 else
41 {
42 return true;
43 }
44 }
45 }
46}
static includeModule($moduleName)
Definition loader.php:69