瀏覽代碼

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 查看文件

@@ -9,6 +9,20 @@ namespace Baldarian\AdminReorder\Rewrite\Magento\Eav\Model;

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 查看文件

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

Loading…
取消
儲存