Magento Request - Frontend or Backend?

后端 未结 5 1968
臣服心动
臣服心动 2020-12-29 05:31

How can I tell if the current request is for a backend or frontend page? This check will be done inside an observer, so I do have access to the request object if that helps

5条回答
  •  星月不相逢
    2020-12-29 05:33

    If you're able to use an observer, you can limit it to the 'adminhtml' event area.

    
    ...
      
        
          
            
              
                singleton
                mynamespace_mymodule/observer
                adminPrepareLayoutBefore
              
            
          
        
      
    
    

提交回复
热议问题