Magento2的Model是如何进行CURD的?

8.47K 浏览M2交流区

Magento2的Model是如何进行CURD的?

https://gitee.com/zouhongzhao/magento2-action-extension-demo/blob/master/Demo/Block/PhysicalStores.php

有谁知道这个demo/physicalstores/enabled的值是侟在哪张表里面?

0

你理解错了。
$this->isEnabledStaffs()这个方法在
https://gitee.com/zouhongzhao/magento2-action-extension-demo/blob/master/Demo/Block/PhysicalStores.php
里面。
$this->getConfig('demo/physicalstores/enabled');
是读取后台configuration页面该插件的设置,是判断这个插件是否启用,如果启用的话就执行,不启用就不执行。
其实这个判断可有可无,看个人需求。主要目的是如果后台该插件的enabled设为no,就不启用执行该插件的功能。

跟$_store->getStatus()没有半毛钱关系。

0
您正在查看6个回答中的1个,单击此处查看所有回答。