1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ap.php
См. документацию.
1<?php
3
5
36class ApTable extends Main\Entity\DataManager
37{
43 public static function getTableName()
44 {
45 return 'b_socialservices_ap';
46 }
47
53 public static function getMap()
54 {
55 return array(
56 'ID' => array(
57 'data_type' => 'integer',
58 'primary' => true,
59 'autocomplete' => true,
60 ),
61 'TIMESTAMP_X' => array(
62 'data_type' => 'datetime',
63 ),
64 'USER_ID' => array(
65 'data_type' => 'integer',
66 'required' => true,
67 ),
68 'DOMAIN' => array(
69 'data_type' => 'string',
70 ),
71 'ENDPOINT' => array(
72 'data_type' => 'string',
73 ),
74 'LOGIN' => array(
75 'data_type' => 'string',
76 ),
77 'PASSWORD' => array(
78 'data_type' => 'string',
79 ),
80 'LAST_AUTHORIZE' => array(
81 'data_type' => 'datetime',
82 ),
83 'SETTINGS' => array(
84 'data_type' => 'string',
85 'serialized' => true,
86 ),
87 );
88 }
89
90 public static function onBeforeUpdate(Main\Entity\Event $event)
91 {
92 $result = new Main\Entity\EventResult();
93
94 $data = $event->getParameter("fields");
95
96 // modify TIMESTAMP_X for every change other than single LAST_AUTHORIZE update
97 if(count($data) > 1 || !array_key_exists('LAST_AUTHORIZE', $data))
98 {
99 $data['TIMESTAMP_X'] = new Main\Type\DateTime();
100 $result->modifyFields($data);
101 }
102
103 return $result;
104 }
105
106 public static function getConnection()
107 {
108 $dbRes = static::getList(array(
109 'order' => array('ID' => 'DESC'),
110 'limit' => 1,
111 'cache' => ['ttl' => 3600],
112 ));
113
114 return $dbRes->fetch();
115 }
116}
Определения event.php:5
static getMap()
Определения ap.php:53
static getConnection()
Определения ap.php:106
static onBeforeUpdate(Main\Entity\Event $event)
Определения ap.php:90
static getTableName()
Определения ap.php:43
$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
$result
Определения get_property_values.php:14
Определения ufield.php:9
Определения ap.php:2
$event
Определения prolog_after.php:141
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
$dbRes
Определения yandex_detail.php:168