当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Message_Abstract类代码示例

本文整理汇总了PHP中Mage_Core_Model_Message_Abstract的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Message_Abstract类的具体用法?PHP Mage_Core_Model_Message_Abstract怎么用?PHP Mage_Core_Model_Message_Abstract使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Mage_Core_Model_Message_Abstract类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMessageCssClass

 public function getMessageCssClass(Mage_Core_Model_Message_Abstract $message)
 {
     if (isset(self::$_messageMap[$message->getType()])) {
         return self::$_messageMap[$message->getType()];
     }
     return $message->getType();
 }
开发者ID:hsq,项目名称:Ho_Ajax,代码行数:7,代码来源:Messages.php

示例2: addMessage

 public function addMessage(Mage_Core_Model_Message_Abstract $message)
 {
     if (!isset($this->_messages[$message->getType()])) {
         $this->_messages[$message->getType()] = array();
     }
     $this->_messages[$message->getType()][] = $message;
     return $this;
 }
开发者ID:par-orillonsoft,项目名称:Magento,代码行数:8,代码来源:Exception.php

示例3: addMessage

 /**
  * Adding new message to collection
  *
  * @param   Mage_Core_Model_Message_Abstract $message
  * @return  Mage_Core_Model_Message_Collection
  */
 public function addMessage(Mage_Core_Model_Message_Abstract $message)
 {
     // Only do this for MB, not Magento standalone
     if (Mage::getSingleton('magebridge/core')->getMetaData('enable_messages') == 1) {
         $text = base64_encode($message->getCode());
         switch ($message->getType()) {
             case 'error':
                 header('X-MageBridge-Error: ' . $text);
                 break;
             case 'warning':
                 header('X-MageBridge-Warning: ' . $text);
                 break;
             case 'success':
             case 'notice':
             default:
                 header('X-MageBridge-Notice: ' . $text);
                 break;
         }
     }
     // Perform the parent action
     return parent::addMessage($message);
 }
开发者ID:apiceweb,项目名称:MageBridgeCore,代码行数:28,代码来源:Collection.php

示例4: addMessage

 public function addMessage(Mage_Core_Model_Message_Abstract $message)
 {
     // ensure duplicate messages are not added
     $identifier = md5($message->getType() . '-' . $message->getText() . '-' . $message->getCode() . '-' . $message->getIdentifier() . '-' . (int) $message->getIsSticky());
     $messages = $this->getMessages()->getItems();
     foreach ($messages as $m) {
         $identifier2 = md5($m->getType() . '-' . $m->getText() . '-' . $m->getCode() . '-' . $m->getIdentifier() . '-' . (int) $m->getIsSticky());
         if ($identifier == $identifier2) {
             return $this;
         }
     }
     return parent::addMessage($message);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:13,代码来源:Session.php

示例5: addMessage

 public function addMessage(Mage_Core_Model_Message_Abstract $message)
 {
     $message->setIdentifier(uniqid() . '|' . $this->_now);
     return parent::addMessage($message);
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:5,代码来源:Session.php

示例6: addMessage

 /**
  * Adding new message to message collection
  *
  * @param   Mage_Core_Model_Message_Abstract $message
  * @return  Mage_Core_Block_Messages
  */
 public function addMessage(Mage_Core_Model_Message_Abstract $message)
 {
     if ($this->_fixMessages()) {
         $this->_saveMessages($message->getItems());
     } else {
         parent::addMessage($message);
     }
     return $this;
 }
开发者ID:thiagormartins,项目名称:iugu-magento-skeleton,代码行数:15,代码来源:Messages.php

示例7: __construct

 public function __construct($code)
 {
     parent::__construct(Mage_Core_Model_Message::ERROR, $code);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:4,代码来源:Error.php

示例8: __construct

 /**
  * Constructor for to initialize the message with
  * the passed code.
  *
  * @param string $code The code to initialize the message with
  * @return void
  */
 public function __construct($code)
 {
     parent::__construct(Faett_Manager_Model_Message::CONSOLE, $code);
 }
开发者ID:BGCX067,项目名称:faett-manager-svn-to-git,代码行数:11,代码来源:Console.php

示例9: __construct

 /**
  * Initializes a migration message.
  *
  * @param string $code
  * @return void
  */
 public function __construct($code)
 {
     return parent::__construct(self::MESSAGE_TYPE, $code);
 }
开发者ID:victso,项目名称:MigrationHelper,代码行数:10,代码来源:Migration.php


注:本文中的Mage_Core_Model_Message_Abstract类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。