uawdijnntqw1x1x1
IP : 3.138.178.107
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
kirov.axolotls.ru
/
bitrix
/
modules
/
location
/
lib
/
model
/
addresslinktable.php
/
/
<?php namespace Bitrix\Location\Model; use Bitrix\Main; use Bitrix\Main\ORM\Fields; use Bitrix\Main\ORM\Query\Join; class AddressLinkTable extends Main\ORM\Data\DataManager { /** * Returns DB table name for entity. * * @return string */ public static function getTableName() { return 'b_location_addr_link'; } /** * Returns entity map definition. * * @return array */ public static function getMap() { return [ (new Fields\IntegerField('ADDRESS_ID')) ->configurePrimary(true), (new Fields\StringField('ENTITY_ID')) ->configurePrimary(true) ->addValidator(new Main\ORM\Fields\Validators\LengthValidator(1, 100)), // todo: int (new Fields\StringField('ENTITY_TYPE')) ->configurePrimary(true) ->addValidator(new Main\ORM\Fields\Validators\LengthValidator(1, 50)), // Ref (new Fields\Relations\Reference('ADDRESS', AddressTable::class, Join::on('this.ADDRESS_ID', 'ref.ID'))) ->configureJoinType('inner') ]; } /** * @param int $addressId * @throws Main\Db\SqlQueryException */ public static function deleteByAddressId(int $addressId): void { Main\Application::getConnection()->queryExecute(" DELETE FROM ".self::getTableName()." WHERE ADDRESS_ID=".(int)$addressId ); } /** * @param string $entityType * @throws Main\Db\SqlQueryException */ public static function deleteByEntityType(string $entityType): void { $connection = Main\Application::getConnection(); $sqlHelper = $connection->getSqlHelper(); Main\Application::getConnection()->queryExecute(" DELETE FROM ".self::getTableName()." WHERE ENTITY_TYPE = '".$sqlHelper->forSql($entityType)."'" ); } }
/var/www/axolotl/data/www/kirov.axolotls.ru/bitrix/modules/location/lib/model/addresslinktable.php