1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
logfollow.php
См. документацию.
1<?php
8namespace Bitrix\Socialnetwork;
9
10use Bitrix\Main;
11use Bitrix\Main\Config\Option;
12use Bitrix\Main\Entity;
13use Bitrix\Main\Localization\Loc;
14use Bitrix\Main\NotImplementedException;
15
16Loc::loadMessages(__FILE__);
17
34class LogFollowTable extends Entity\DataManager
35{
36 public static function getTableName()
37 {
38 return 'b_sonet_log_follow';
39 }
40
41 public static function getMap()
42 {
43 $fieldsMap = array(
44 'USER_ID' => array(
45 'data_type' => 'integer',
46 'primary' => true
47 ),
48 'CODE' => array(
49 'data_type' => 'string',
50 'primary' => true
51 ),
52 'TYPE' => array(
53 'data_type' => 'boolean',
54 'values' => array('N','Y')
55 ),
56 );
57
58 return $fieldsMap;
59 }
60
61 public static function getDefaultValue($params = array())
62 {
63 global $USER;
64
65 $siteId = (
66 isset($params['SITE_ID'])
67 ? $params['SITE_ID']
68 : SITE_ID
69 );
70
71 $defaultValue = Option::get("socialnetwork", "follow_default_type", "Y", $siteId);
72
73 $userId = (
74 isset($params['USER_ID'])
75 ? $params['USER_ID']
76 : ($USER->isAuthorized() ? $USER->getId() : false)
77 );
78
79 if (intval($userId) <= 0)
80 {
81 return $defaultValue;
82 }
83
84 $res = self::getList(array(
85 'filter' => array(
86 "USER_ID" => $userId,
87 "=CODE" => "**"
88 ),
89 'select' => array('TYPE')
90 )
91 );
92 if ($follow = $res->fetch())
93 {
94 $defaultValue = $follow['TYPE'];
95 }
96
97 return $defaultValue;
98 }
99
100 public static function add(array $data)
101 {
102 throw new NotImplementedException("Use add() method of the class.");
103 }
104
105 public static function update($primary, array $data)
106 {
107 throw new NotImplementedException("Use update() method of the class.");
108 }
109}
if($_SERVER $defaultValue['REQUEST_METHOD']==="GET" &&!empty($RestoreDefaults) && $bizprocPerms==="W" &&check_bitrix_sessid())
Определения options.php:32
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getDefaultValue($params=array())
Определения logfollow.php:61
static add(array $data)
Определения logfollow.php:100
static update($primary, array $data)
Определения logfollow.php:105
static getTableName()
Определения logfollow.php:36
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
global $USER
Определения csv_new_run.php:40
$siteId
Определения ajax.php:8
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
const SITE_ID
Определения sonet_set_content_view.php:12