Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Index_Adminhtml_ProcessController
  • Mage_Index_Block_Adminhtml_Notifications
  • Mage_Index_Block_Adminhtml_Process
  • Mage_Index_Block_Adminhtml_Process_Edit
  • Mage_Index_Block_Adminhtml_Process_Edit_Form
  • Mage_Index_Block_Adminhtml_Process_Edit_Tab_Main
  • Mage_Index_Block_Adminhtml_Process_Edit_Tabs
  • Mage_Index_Block_Adminhtml_Process_Grid
  • Mage_Index_Block_Adminhtml_Process_Grid_Massaction
  • Mage_Index_Helper_Data
  • Mage_Index_Model_Event
  • Mage_Index_Model_Indexer
  • Mage_Index_Model_Indexer_Abstract
  • Mage_Index_Model_Mysql4_Abstract
  • Mage_Index_Model_Mysql4_Event
  • Mage_Index_Model_Mysql4_Event_Collection
  • Mage_Index_Model_Mysql4_Process
  • Mage_Index_Model_Mysql4_Process_Collection
  • Mage_Index_Model_Mysql4_Setup
  • Mage_Index_Model_Observer
  • Mage_Index_Model_Process
  • Mage_Index_Model_Resource_Abstract
  • Mage_Index_Model_Resource_Event
  • Mage_Index_Model_Resource_Event_Collection
  • Mage_Index_Model_Resource_Helper_Mysql4
  • Mage_Index_Model_Resource_Process
  • Mage_Index_Model_Resource_Process_Collection
  • Mage_Index_Model_Resource_Setup
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Index
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: class Mage_Index_Model_Observer
 28: {
 29:     /**
 30:      * Indexer model
 31:      *
 32:      * @var Mage_Index_Model_Indexer
 33:      */
 34:     protected $_indexer;
 35: 
 36:     public function __construct()
 37:     {
 38:         $this->_indexer = Mage::getSingleton('index/indexer');
 39:     }
 40: 
 41:     /**
 42:      * Store after commit observer. Process store related indexes
 43:      *
 44:      * @param Varien_Event_Observer $observer
 45:      */
 46:     public function processStoreSave(Varien_Event_Observer $observer)
 47:     {
 48:         $store = $observer->getEvent()->getStore();
 49:         $this->_indexer->processEntityAction(
 50:             $store,
 51:             Mage_Core_Model_Store::ENTITY,
 52:             Mage_Index_Model_Event::TYPE_SAVE
 53:         );
 54:     }
 55: 
 56:     /**
 57:      * Store group after commit observer. Process store group related indexes
 58:      *
 59:      * @param Varien_Event_Observer $observer
 60:      */
 61:     public function processStoreGroupSave(Varien_Event_Observer $observer)
 62:     {
 63:         $storeGroup = $observer->getEvent()->getStoreGroup();
 64:         $this->_indexer->processEntityAction(
 65:             $storeGroup,
 66:             Mage_Core_Model_Store_Group::ENTITY,
 67:             Mage_Index_Model_Event::TYPE_SAVE
 68:         );
 69:     }
 70: 
 71:     /**
 72:      * Website save after commit observer. Process website related indexes
 73:      *
 74:      * @param Varien_Event_Observer $observer
 75:      */
 76:     public function processWebsiteSave(Varien_Event_Observer $observer)
 77:     {
 78:         $website = $observer->getEvent()->getWebsite();
 79:         $this->_indexer->processEntityAction(
 80:             $website,
 81:             Mage_Core_Model_Website::ENTITY,
 82:             Mage_Index_Model_Event::TYPE_SAVE
 83:         );
 84:     }
 85: 
 86:     /**
 87:      * Store after commit observer. Process store related indexes
 88:      *
 89:      * @param Varien_Event_Observer $observer
 90:      */
 91:     public function processStoreDelete(Varien_Event_Observer $observer)
 92:     {
 93:         $store = $observer->getEvent()->getStore();
 94:         $this->_indexer->processEntityAction(
 95:             $store,
 96:             Mage_Core_Model_Store::ENTITY,
 97:             Mage_Index_Model_Event::TYPE_DELETE
 98:         );
 99:     }
100: 
101:     /**
102:      * Store group after commit observer. Process store group related indexes
103:      *
104:      * @param Varien_Event_Observer $observer
105:      */
106:     public function processStoreGroupDelete(Varien_Event_Observer $observer)
107:     {
108:         $storeGroup = $observer->getEvent()->getStoreGroup();
109:         $this->_indexer->processEntityAction(
110:             $storeGroup,
111:             Mage_Core_Model_Store_Group::ENTITY,
112:             Mage_Index_Model_Event::TYPE_DELETE
113:         );
114:     }
115: 
116:     /**
117:      * Website save after commit observer. Process website related indexes
118:      *
119:      * @param Varien_Event_Observer $observer
120:      */
121:     public function processWebsiteDelete(Varien_Event_Observer $observer)
122:     {
123:         $website = $observer->getEvent()->getWebsite();
124:         $this->_indexer->processEntityAction(
125:             $website,
126:             Mage_Core_Model_Website::ENTITY,
127:             Mage_Index_Model_Event::TYPE_DELETE
128:         );
129:     }
130: 
131:     /**
132:      * Config data after commit observer.
133:      *
134:      * @param Varien_Event_Observer $observer
135:      */
136:     public function processConfigDataSave(Varien_Event_Observer $observer)
137:     {
138:         $configData = $observer->getEvent()->getConfigData();
139:         $this->_indexer->processEntityAction(
140:             $configData,
141:             Mage_Core_Model_Config_Data::ENTITY,
142:             Mage_Index_Model_Event::TYPE_SAVE
143:         );
144:     }
145: 
146: }
147: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0