Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
searchengine.php
1<?php
8namespace Bitrix\Seo;
9
11
28class SearchEngineTable extends Entity\DataManager
29{
30 const INACTIVE = 'N';
31 const ACTIVE = 'Y';
32
33 public static function getFilePath()
34 {
35 return __FILE__;
36 }
37
38 public static function getTableName()
39 {
40 return 'b_seo_search_engine';
41 }
42
43 public static function getMap()
44 {
45 $fieldsMap = array(
46 'ID' => array(
47 'data_type' => 'integer',
48 'primary' => true,
49 'autocomplete' => true,
50 ),
51 'CODE' => array(
52 'data_type' => 'string',
53 'required' => true,
54 ),
55 'ACTIVE' => array(
56 'data_type' => 'boolean',
57 'values' => array(self::INACTIVE, self::ACTIVE)
58 ),
59 'SORT' => array(
60 'data_type' => 'integer',
61 ),
62 'NAME' => array(
63 'data_type' => 'string',
64 ),
65 'CLIENT_ID' => array(
66 'data_type' => 'string',
67 ),
68 'CLIENT_SECRET' => array(
69 'data_type' => 'string',
70 ),
71 'REDIRECT_URI' => array(
72 'data_type' => 'string',
73 ),
74 'SETTINGS' => array(
75 'data_type' => 'text',
76 ),
77 );
78
79 return $fieldsMap;
80 }
81
82 public static function getByCode($code)
83 {
84 return SearchEngineTable::getList([
85 'filter' => ['=CODE' => $code],
86 ]);
87 }
88}