0
在magento Core事件中是否有adminhtml_permissions_user_save_before事件?Magento核心模塊事件
我創建了一個觀察器來觀察ADMIN USER before_save事件因爲我想根據角色類型執行特定的操作,所以我不想編輯核心模塊。
編輯:
<config>
<modules>
<Eco_Perm>
<version>1.0.9</version>
</Eco_Perm>
</modules>
<global>
<models>
<perm>
<class>Eco_Perm_Model</class>
<resourceModel>perms</resourceModel>
</perm>
<perms>
<class>Eco_Perm_Model_Mysql4</class>
<entities>
<perm>
<table>perm/observer</table>
</perm>
</entities>
</perms>
</models>
<resources>
<perm>
<setup>
<module>Eco_Perm</module>
<class>Eco_Perm_Model_Resource_Setup</class>
</setup>
</perm>
</resources>
<events>
<catalog_product_save_before>
<observers>
<Eco_Perm_Model_Observer>
<type>singleton</type>
<class>perm/observer</class>
<method>testProductedit</method>
</Eco_Perm_Model_Observer>
</observers>
</catalog_product_save_before>
<adminhtml_permissions_user_save_before>
<observer>
<Eco_Perm_Model_Observer>
<type>singleton</type>
<class>perm/observer</class>
<method>updatepermer</method>
</Eco_Perm_Model_Observer>
</observer>
</adminhtml_permissions_user_save_before>
</events>
</global>
<admin>
<routers>
<perm>
<use>admin</use>
<args>
<module>Eco_Perm</module>
<frontName>perm</frontName>
</args>
</perm>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<perm>
<file>perm.xml</file>
</perm>
</updates>
</layout>
<menu>
<perm translate="title" module="adminhtml">
<title>Affiliate</title>
<sort_order>100</sort_order>
<children>
<set_time>
<title>Shipper's</title>
<action>perm/adminhtml_index</action>
</set_time>
</children>
</perm>
</menu>
</adminhtml>
我試過了你的建議和Alan Storm的參考文章。我也嘗試了「admin_user_save_before」事件,但獲得了以下警告消息:警告:Mage_Core_Model_App :: dispatchEvent()[mage-core-model-app.dispatchevent]:節點不再存在 – 2013-02-27 10:46:21
您可以發佈模塊配置中的代碼文件。 – 2013-02-27 11:06:42
:編輯我的問題。 – 2013-02-27 11:18:18