瀏覽代碼

set used_in_forms $fom Array

develop
Àngel Rodríguez 1 年之前
父節點
當前提交
22383afe7b
共有 2 個文件被更改,包括 16 次插入1 次删除
  1. +14
    -0
      Rewrite/Magento/Eav/Model/Attribute.php
  2. +2
    -1
      composer.json

+ 14
- 0
Rewrite/Magento/Eav/Model/Attribute.php 查看文件



class Attribute extends \Magento\Eav\Model\Attribute class Attribute extends \Magento\Eav\Model\Attribute
{ {
/**
* Return forms in which the attribute
*
* @return array
*/
public function getUsedInForms()
{
$forms = $this->getData('used_in_forms');
if ($forms === null) {
$forms = [];
$this->setData('used_in_forms', $forms);
}


return $forms;
}
} }



+ 2
- 1
composer.json 查看文件

"description": "Fix reorder error from admin", "description": "Fix reorder error from admin",
"type": "magento2-module", "type": "magento2-module",
"license": "GPL-3.0", "license": "GPL-3.0",
"version": "1.0.0",
"authors": [ "authors": [
{ {
"name": "Mage2Gen", "name": "Mage2Gen",
"email": "info@mage2gen.com" "email": "info@mage2gen.com"
}, },
{ {
"name": "\u00c1ngel \u00c1ngel Rodr\u00edguez",
"name": "Àngel Rodríguez",
"email": "angel.r.baldarian@gmail.com" "email": "angel.r.baldarian@gmail.com"
} }
], ],

Loading…
取消
儲存