Spamworldpro Mini Shell
Spamworldpro


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/old/vendor/magento/module-catalog/view/adminhtml/web/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/magento/module-catalog/view/adminhtml/web/js/bundle-proxy-button.js
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * @api
 * @deprecated since version 2.2.0
 */
define([
    'Magento_Ui/js/form/components/button',
    'uiRegistry',
    'underscore'
], function (Button, registry, _) {
    'use strict';

    return Button.extend({
        defaults: {
            currentRecordNamespace: 'bundle_current_record',
            listingDataProvider: '',
            value: [],
            imports: {
                currentRecordName: '${ $.provider }:${ $.currentRecordNamespace }',
                listingData: '${ $.provider }:${ $.listingDataProvider }'
            },
            links: {
                value: '${ $.provider }:${ $.dataScope }'
            },
            listens: {
                listingData: 'setListingData'
            }
        },

        /**
         * Initializes component.
         *
         * @returns {Object} Chainable.
         */
        initialize: function () {
            this._super()
                .initSource();

            return this;
        },

        /**
         * Calls 'initObservable' of parent
         *
         * @returns {Object} Chainable.
         */
        initObservable: function () {
            this._super()
                .observe([
                    'value',
                    'listingData'
                ]);

            return this;
        },

        /**
         * Calls 'destroy' of parent and
         * clear listing provider source
         *
         * @returns {Object} Chainable.
         */
        destroy: function () {
            this._super();
            this.source.set(this.listingDataProvider, []);

            return this;
        },

        /**
         * Call parent "action" method
         * and set new data to record and listing.
         *
         * @returns {Object} Chainable.
         */

        action: function () {
            this._super();
            this.source.set(this.currentRecordNamespace, this.name);
            this.source.set(this.listingDataProvider, this.value());

            return this;
        },

        /**
         * Init current source.
         *
         * @returns {Object} Chainable.
         */
        initSource: function () {
            if (!_.isFunction(this.source)) {
                this.source = registry.get(this.provider);
            }

            return this;
        },

        /**
         * Set data to listing source.
         *
         * @returns {Object} Chainable.
         */
        setListingData: function (data) {
            if (this.name === this.currentRecordName) {
                this.source.set(this.dataScope, data);
            }

            return this;
        }
    });
});

Spamworldpro Mini