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


PHP Mage_Core_Model_App::dispatchEvent方法代码示例

本文整理汇总了PHP中Mage_Core_Model_App::dispatchEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_App::dispatchEvent方法的具体用法?PHP Mage_Core_Model_App::dispatchEvent怎么用?PHP Mage_Core_Model_App::dispatchEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_App的用法示例。


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

示例1: _buildContainer

 /**
  * @return Container
  */
 private function _buildContainer()
 {
     $this->_generatorConfig->addCompilerPass($this->_storeConfigCompilerPass);
     $this->_generatorConfig->addCompilerPass($this->_injectableCompilerPass);
     $this->_mageApp->dispatchEvent('symfony_container_before_container_generator', ['generator_config' => $this->_generatorConfig]);
     $generator = new ContainerGenerator($this->_generatorConfig);
     return $this->_container = $generator->getContainer();
 }
开发者ID:inviqa,项目名称:magento-symfony-container,代码行数:11,代码来源:ContainerProvider.php

示例2: _prepareAffectedProduct

 /**
  * Prepare affected product
  */
 protected function _prepareAffectedProduct()
 {
     /** @var $modelCondition Mage_Catalog_Model_Product_Condition */
     $modelCondition = $this->_factory->getModel('catalog/product_condition');
     $productCondition = $modelCondition->setTable($this->_resource->getTable('catalogrule/affected_product'))->setPkFieldName('product_id');
     $this->_app->dispatchEvent('catalogrule_after_apply', array('product' => $this->_getProduct(), 'product_condition' => $productCondition));
     $this->_connection->delete($this->_resource->getTable('catalogrule/affected_product'));
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:11,代码来源:Refresh.php

示例3: dispatchEvent

 /**
  * @see Mage_Core_Model_App::dispatchEvent($eventName, $args)
  */
 public function dispatchEvent($eventName, $args)
 {
     $event = new Varien_Event($args);
     $event->setName($eventName);
     $observer = new Varien_Event_Observer();
     $observer->setData(array('event' => $event));
     $observer->addData($args);
     $this->_bar->update($observer->getEvent());
     return parent::dispatchEvent($eventName, $args);
 }
开发者ID:nicolas-bastien,项目名称:MagentoUnderControl,代码行数:13,代码来源:App.php

示例4: dispatchEvent

 /**
  * Dispatch event
  *
  * Calls all observer callbacks registered for this event
  * and multiobservers matching event name pattern
  *
  * @param string $name
  * @param array $args
  */
 public static function dispatchEvent($name, array $data = array())
 {
     if (VPROF) {
         Varien_Profiler::start('DISPATCH EVENT:' . $name);
     }
     $result = AO::$_app->dispatchEvent($name, $data);
     if (VPROF) {
         Varien_Profiler::stop('DISPATCH EVENT:' . $name);
     }
     return $result;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:20,代码来源:AO.php

示例5: _resetSearchResults

 /**
  * Reset search results
  *
  * @return void
  */
 protected function _resetSearchResults()
 {
     $adapter = $this->_getWriteAdapter();
     $adapter->update($this->_getTable('catalogsearch/search_query'), array('is_processed' => 0));
     $adapter->delete($this->_getTable('catalogsearch/result'));
     $this->_app->dispatchEvent('enterprise_catalogsearch_reset_search_result', array());
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:12,代码来源:Refresh.php

示例6: _dispatchNotification

 /**
  * Dispatches an event after reindex
  * @return Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh
  */
 protected function _dispatchNotification()
 {
     $this->_app->dispatchEvent('catalog_category_product_full_reindex', array());
     return $this;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:9,代码来源:Refresh.php

示例7: dispatchEvent

 /**
  * Overriden for disabling events
  * fire during fixture loading
  *
  * (non-PHPdoc)
  * @see Mage_Core_Model_App::dispatchEvent()
  */
 public function dispatchEvent($eventName, $args)
 {
     if ($this->_eventsEnabled) {
         parent::dispatchEvent($eventName, $args);
         if (!isset($this->_dispatchedEvents[$eventName])) {
             $this->_dispatchedEvents[$eventName] = 0;
         }
         $this->_dispatchedEvents[$eventName]++;
     }
     return $this;
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:18,代码来源:App.php

示例8: match

 /**
  * Match product rewrite
  *
  * @param array $rewriteRow
  * @param string $requestPath
  * @return bool
  */
 public function match(array $rewriteRow, $requestPath)
 {
     if (Enterprise_Catalog_Model_Product::URL_REWRITE_ENTITY_TYPE != $rewriteRow['entity_type']) {
         return false;
     }
     $rewriteParts = explode('/', $rewriteRow['request_path']);
     $rewriteTail = array_pop($rewriteParts);
     if (!empty($this->_seoSuffix)) {
         $rewriteTail .= '.' . $this->_seoSuffix;
     }
     $requestParts = explode('/', $requestPath);
     $requestTail = array_pop($requestParts);
     if (strcmp($rewriteTail, $requestTail) === 0) {
         $categoryPath = implode('/', $requestParts);
         $productId = $this->_productResource->getProductIdByRewrite($rewriteRow['url_rewrite_id'], $this->_prevStoreId);
         $isMatched = !empty($productId) && $this->_isRewriteRedefinedInStore($productId, $rewriteRow['request_path']) && $this->_isProductAssignedToCategory($productId, $categoryPath);
         if ($isMatched) {
             $this->_checkStoreRedirect($productId, $categoryPath);
             if (!empty($categoryPath)) {
                 $categoryId = $this->_categoryResource->getCategoryIdByRequestPath($categoryPath, $this->_storeId);
                 $this->_app->dispatchEvent('catalog_category_product_fix_category_id', array('category_id' => $categoryId));
             }
             return true;
         }
     }
     return false;
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:34,代码来源:Product.php


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