%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.227.52.11 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 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, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/lib/ |
Upload File : |
<?php namespace Bitrix\Sale; /** * Class ShipmentPropertyValueCollection * @package Bitrix\Sale */ class ShipmentPropertyValueCollection extends EntityPropertyValueCollection { /** @var Shipment */ protected $shipment; /** * Returns Events name on value deleted. * @return string */ protected static function getOnValueDeletedEventName(): string { return 'OnSaleShipmentPropertyValueDeleted'; } /** * Returns Events name on before value deleted. * @return string */ protected static function getOnBeforeValueDeletedEventName(): string { return 'OnBeforeSaleShipmentPropertyValueDeleted'; } /** * @return string Property class name. */ protected static function getPropertyClassName(): string { $registry = Registry::getInstance(static::getRegistryType()); return $registry->getShipmentPropertyClassName(); } /** * @return Shipment */ protected function getEntityParent() { return $this->shipment; } /** * @return string \Bitrix\Sale\Registry::ENTITY_SHIPMENT */ protected static function getEntityType(): string { return \Bitrix\Sale\Registry::ENTITY_SHIPMENT; } /** * @return string EntityPropertyValue class name. * @throws \Bitrix\Main\ArgumentException */ protected static function getPropertyValueClassName(): string { $registry = Registry::getInstance(static::getRegistryType()); return $registry->getShipmentPropertyValueClassName(); } /** * @param Shipment $shipment * @return ShipmentPropertyValueCollection * @throws \Bitrix\Main\ArgumentException */ public static function load(Shipment $shipment): ShipmentPropertyValueCollection { $propertyCollection = static::createPropertyValueCollectionObject(); $propertyCollection->setShipment($shipment); /** @var ShipmentPropertyValue $propertyValueClassName */ $propertyValueClassName = static::getPropertyValueClassName(); $props = $propertyValueClassName::loadForEntity($shipment); /** @var ShipmentPropertyValue $prop */ foreach ($props as $prop) { $prop->setCollection($propertyCollection); $propertyCollection->addItem($prop); } return $propertyCollection; } /** * @return \Bitrix\Sale\Order */ public function getOrder() { return $this->shipment->getOrder(); } private static function createPropertyValueCollectionObject() { $registry = Registry::getInstance(static::getRegistryType()); $propertyValueCollectionClassName = $registry->getShipmentPropertyValueCollectionClassName(); return new $propertyValueCollectionClassName(); } /** * @param Shipment $shipment */ protected function setShipment(Shipment $shipment) { $this->shipment = $shipment; } }