Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento小部件可用类型_Magento - Fatal编程技术网

Magento小部件可用类型

Magento小部件可用类型,magento,Magento,我正在用Magento开发一个小部件。我成功地遵照指示行事。 现在我想更改后端小部件插入的行为。特别是我想更改一些输入的类型,从实际的multiselect更改为其他类型(我想上传一个文件) 执行此操作的代码是: <parameters> <enabled_services> <label>Enabled Services</label> <visible>1</visible> <requ

我正在用Magento开发一个小部件。我成功地遵照指示行事。 现在我想更改后端小部件插入的行为。特别是我想更改一些输入的类型,从实际的multiselect更改为其他类型(我想上传一个文件)

执行此操作的代码是:

<parameters>
  <enabled_services>
    <label>Enabled Services</label>
    <visible>1</visible>
    <required>1</required>
    <type>multiselect</type>
    <source_model>widgettwo/services</source_model>
  </enabled_services>
</parameters>

启用的服务
1.
1.
多选
WidgetWO/服务

所以,我不想多选,我想要别的东西。在哪里可以找到所有可用类型的列表?。有什么指南吗?

在您上面引用的教程中,它会告诉您类型

发件人:


选择
1.
一个
2.
两个
3.
三
adminhtml/system\u config\u source\u yesno
模块/块类型
价值1
价值1
一个
两个

此StackExchange问题可能会回答您问题的上载部分:

此类问题的类型更多。这里有所有的html输入
            <!-- Option type -->
            <type>select</type>
            <!--
                It can be either one of the simple form element types, e.g.:
                    <type>text</type>
                    <type>select</type>
                    <type>multiselect</type>
                    <type>label</type>
                ...

                or it can define a renderer which will be used to create
                this configuration field in the edit form.
                Renderer is supposed to be a block reference
                in 'block_group/block_path' format, e.g.:
                    <type>mymodule/some_custom_block</type>
            -->

            <!-- Source values for drop-downs and multiselects -->

            <!--
                There are two possible ways to define a set of available values.
                The first way is to specify the list of available values right here:
            -->
            <values>
                <one translate="label">
                    <value>1</value>
                    <label>One</label>
                </one>
                <two translate="label">
                    <value>2</value>
                    <label>Two</label>
                </two>
                <three translate="label">
                    <value>3</value>
                    <label>Three</label>
                </three>
            </values>

            <!--
                The second way is to specify the source model,
                which must have toOptionArray() public method available.
                The method should return an array of values and labels
                in the following format:
                    array(
                        array('value' => 'value1', 'label' => 'Label 1'),
                        array('value' => 'value2', 'label' => 'Label 2'),
                        array('value' => 'value2', 'label' => 'Label 3'),
                    );
                Source model name is specified in usual
                'model_group/model_path' format, e.g.:
            -->
            <source_model>adminhtml/system_config_source_yesno</source_model>

            <!-- Additional helper block to be created on the edit form page, optional -->
            <helper_block>
                <!-- Helper block reference in regular 'block_group/block_path' format -->
                <type>module/block_type</type>

                <!-- Arguments for the block constructor, optional  -->
                <data>
                    <value1>Value1</value1>
                    <value2>Value1</value2>
                    <value3>
                        <one>One</one>
                        <two>Two</two>
                    </value3>
                </data>
            </helper_block>

            <!--
                Here is the full example of helper block definition
                from catalog module widgets:

                <helper_block>
                    <type>adminhtml/catalog_product_widget_chooser</type>
                    <data>
                        <button translate="open">
                            <open>Select Product...</open>
                        </button>
                    </data>
                </helper_block>

            -->
        </first_option>