2namespace Bitrix\Landing;
4use \Bitrix\Main\Entity;
5use \Bitrix\Main\ORM\Query\Result as QueryResult;
6use \Bitrix\Landing\Internals\LockTable;
34 return LockTable::getList([
40 '=ENTITY_TYPE' => $entityType,
41 '=LOCK_TYPE' => $lockType
43 ])->fetch() ? true :
false;
54 protected static function lockEntity(
int $entityId,
string $entityType,
string $lockType,
bool $lock =
true): bool
56 $current = LockTable::getList([
62 '=ENTITY_TYPE' => $entityType,
63 '=LOCK_TYPE' => $lockType
66 if (!$lock && isset($current[
'ID']))
68 return LockTable::delete($current[
'ID'])->isSuccess();
70 if ($lock && !isset($current[
'ID']))
72 return LockTable::add([
74 'ENTITY_TYPE' => $entityType,
75 'LOCK_TYPE' => $lockType
88 if (self::isEntityLocked(
$siteId, self::ENTITY_TYPE_SITE, self::LOCK_TYPE_DELETE))
93 return LockTable::getList([
99 '=ENTITY_TYPE' => self::ENTITY_TYPE_LANDING,
100 '=LOCK_TYPE' => self::LOCK_TYPE_DELETE
103 new Entity\ReferenceField(
105 'Bitrix\Landing\Internals\LandingTable',
107 '=this.ENTITY_ID' =>
'ref.ID',
108 '=this.ENTITY_TYPE' => [
109 '?', self::ENTITY_TYPE_LANDING
114 ])->fetch() ? true :
false;
135 if (Site::ping(
$siteId, !$lock))
150 if (Landing::ping($landingId, !$lock))
152 return self::lockEntity($landingId, self::ENTITY_TYPE_LANDING, self::LOCK_TYPE_DELETE, $lock);
164 return LockTable::getList(
$params);
static lockDeleteSite(int $siteId, bool $lock=true)
static isSiteDeleteLocked(int $siteId)
static isEntityLocked(int $entityId, string $entityType, string $lockType)
static getList(array $params=[])
static isLandingDeleteLocked(int $landingId)
static lockEntity(int $entityId, string $entityType, string $lockType, bool $lock=true)
const ENTITY_TYPE_LANDING
static lockDeleteLanding(int $landingId, bool $lock=true)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']