![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/app/code/Xtento/StockImport/Block/Adminhtml/Source/Edit/Tab/Type/ |
<?php /** * Product: Xtento_StockImport * ID: u66QkJ5rBwmimhUzUElhIKqqWRvsbhC3WLqSMk5AjmQ= * Last Modified: 2019-02-05T17:10:52+00:00 * File: app/code/Xtento/StockImport/Block/Adminhtml/Source/Edit/Tab/Type/Http.php * Copyright: Copyright (c) XTENTO GmbH & Co. KG <[email protected]> / All rights reserved. */ namespace Xtento\StockImport\Block\Adminhtml\Source\Edit\Tab\Type; class Http extends AbstractType { // HTTP Configuration public function getFields(\Magento\Framework\Data\Form $form) { $fieldset = $form->addFieldset( 'config_fieldset', [ 'legend' => __('HTTP Configuration'), 'class' => 'fieldset-wide' ] ); $fieldset->addField( 'http_note', 'note', [ 'text' => __( '<b>Instructions</b>: To import data to a HTTP server, please follow the following steps:<br>1) Go into the <i>app/code/Xtento/StockImport/Model/Source/</i> directory and rename the file "Http.php.sample" to "Http.php"<br>2) Enter the function name you want to call in the Http.php class in the field below.<br>3) Open the Http.php file and add a function that matches the function name you entered. This function will be called by this source upon importing then.<br><br><b>Example:</b> If you enter server1 in the function name field below, a method called server1() must exist in the Http.php file. This way multiple HTTP servers can be added to the HTTP class, and can be called from different import source, separated by the function name that is called. The function you add then gets called whenever this source is executed by an import profile.' ) ] ); $fieldset->addField( 'custom_function', 'text', [ 'label' => __('Custom Function'), 'name' => 'custom_function', 'note' => __( 'Please make sure the function you enter exists like this in the app/code/Xtento/StockImport/Model/Source/Http.php file:<br>public function <i>yourFunctionName</i>() { ... }' ), 'required' => true ] ); } }