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/rospirotorg.ru/bitrix/modules/lpost.delivery/lib/TabOptions/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/lpost.delivery/lib/TabOptions/TabIntegration.php
<?php

namespace Lpost\Delivery\TabOptions;

use Bitrix\Main\Localization\Loc;
use Lpost\Delivery\Interfaces\InterfaceFieldIntegration;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationAddress;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationCode;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationEmail;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationFIO;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationFlat;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationFloor;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationLocation;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationPhone;
use Lpost\Delivery\Order\FieldIntegration\FieldIntegrationPorch;
use Lpost\Delivery\Repository\RepositoryTypeBuyer;

/**
 * ���� ����� �� �������� ���������
 */
class TabIntegration implements ITabOption
{
    public static function getListOptions(): array
    {

        $typeBuyerList = (new RepositoryTypeBuyer())->getAll();

        $optionsList = [
            [
                'field_departure_number',
                Loc::getMessage("lpost.option_FIELD_DEPARTURE_NUMBER"),
                '',
                [
                    'selectbox',
                    [
                        "ID"           => Loc::getMessage("lpost.option_FIELD_DEPARTURE_NUMBER_ID"),
                        "ORDER_NUMBER" => Loc::getMessage("lpost.option_FIELD_DEPARTURE_NUMBER_ORDER_NUMBER")
                    ]
                ]
            ],
            self::getOptionField(new FieldIntegrationPorch()),
            self::getOptionField(new FieldIntegrationFloor()),
            self::getOptionField(new FieldIntegrationFlat()),
            self::getOptionField(new FieldIntegrationCode()),
            [
                'integration_field_marking_code',
                Loc::getMessage("lpost.option_INTEGRATION_FIELD_MARKING_CODE"),
                null,
                ['text', 20]
            ],
            [
                'integration_field_to_save_id_pickup_point',
                Loc::getMessage("lpost.option_INTEGRATION_FIELD_TO_SAVE_ID_PICKUP_POINT"),
                null,
                ['text', 20]
            ],
            [
                'integration_field_to_save_coordinates',
                Loc::getMessage("lpost.option_INTEGRATION_FIELD_TO_SAVE_COORDINATES"),
                null,
                ['text', 20]
            ],
            [
                'integration_field_to_save_date',
                Loc::getMessage("lpost.option_INTEGRATION_FIELD_TO_SAVE_DATE"),
                null,
                ['text', 20]
            ],
            [
                'integration_field_to_save_time',
                Loc::getMessage("lpost.option_INTEGRATION_FIELD_TO_SAVE_TIME"),
                null,
                ['text', 20]
            ]
        ];

        foreach ($typeBuyerList as $typeBuyer) {
            $optionsList[] =  Loc::getMessage("LPOST_DELIVERY_OPTION_TAB_INTEGRATION_TITLE_BUYER_PROFILE", [
                "#BUYER_NAME#" => $typeBuyer['NAME']
            ]);

            $optionsList[] = self::getOptionField(new FieldIntegrationAddress($typeBuyer['ID']));
            $optionsList[] = self::getOptionField(new FieldIntegrationLocation($typeBuyer['ID']));
            $optionsList[] = self::getOptionField(new FieldIntegrationFIO($typeBuyer['ID']));
            $optionsList[] = self::getOptionField(new FieldIntegrationPhone($typeBuyer['ID']));
            $optionsList[] = self::getOptionField(new FieldIntegrationEmail($typeBuyer['ID']));
        }


        return $optionsList;
    }

    private static function getOptionField(InterfaceFieldIntegration $fieldIntegration): array
    {
        return [
            $fieldIntegration->getCode(),
            $fieldIntegration->getFieldName(),
            $fieldIntegration->getOptionCode(),
            ["text", 20]
        ];
    }

    public static function isPostValidFields()
    {}
}

Youez - 2016 - github.com/yon3zu
LinuXploit