1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
addresstable.php
См. документацию.
1<?php
2
3namespace Bitrix\Location\Model;
4
5use Bitrix\Main;
6use Bitrix\Main\ORM\Fields;
7use Bitrix\Main\ORM\Query\Join;
8use Bitrix\Main\ORM\Event;
9use Bitrix\Main\ORM\EventResult;
10
30{
36 public static function getTableName()
37 {
38 return 'b_location_address';
39 }
40
47 public static function getMap()
48 {
49 return array(
50 (new Fields\IntegerField('ID'))
51 ->configurePrimary(true)
52 ->configureAutocomplete(true),
53
54 new Fields\IntegerField('LOCATION_ID'),
55
56 (new Fields\StringField('LANGUAGE_ID'))
57 ->configureRequired(true)
58 ->addValidator(new Main\ORM\Fields\Validators\LengthValidator(2, 2)),
59
60 new Fields\FloatField('LATITUDE', ['scale' => 6]),
61 new Fields\FloatField('LONGITUDE', ['scale' => 6]),
62
63 (new Fields\Relations\OneToMany('FIELDS', AddressFieldTable::class, 'ADDRESS'))
64 ->configureJoinType('left'),
65
66 (new Fields\Relations\OneToMany('LINKS', AddressLinkTable::class, 'ADDRESS'))
67 ->configureJoinType('left'),
68
69 (new Fields\Relations\Reference('LOCATION', LocationTable::class,
70 Join::on('this.LOCATION_ID', 'ref.ID')))
71 ->configureJoinType('left')
72 );
73 }
74
75 public static function onBeforeAdd(Event $event): EventResult
76 {
77 $result = new EventResult();
78 $result->unsetField('ID');
79
80 return $result;
81 }
82}
static onBeforeAdd(Event $event)
Определения addresstable.php:75
static getTableName()
Определения addresstable.php:36
Определения event.php:5
</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
$event
Определения prolog_after.php:141