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


PHP Varien_Event::setData方法代码示例

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


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

示例1: testGoogleAnonymizationDisabled

 /**
  * @test
  * @loadFixture testGoogleAnonymizationDisabled
  */
 public function testGoogleAnonymizationDisabled()
 {
     $block = $this->app()->getLayout()->createBlock('googleanalytics/ga')->setTemplate('googleanalytics/ga.phtml');
     $transport = new Varien_Object();
     $transport->setHtml($block->toHtml());
     $event = new Varien_Event();
     $event->setData('block', $block);
     $event->setData('transport', $transport);
     $observer = new Varien_Event_Observer();
     $observer->setEvent($event);
     $this->_model->setGAAnonymizerCode($observer);
     $this->assertNotContains('_anonymizeIp', $observer->getEvent()->getTransport()->getHtml());
 }
开发者ID:mrafulfill,项目名称:firegento-magesetup,代码行数:17,代码来源:Observer.php

示例2: setRowUrl

 /**
  * @test
  * @loadFixture ~FireGento_AdminMonitoring/default
  */
 public function setRowUrl()
 {
     $history = Mage::getModel('firegento_adminmonitoring/history')->load(8);
     $transport = new Varien_Object();
     $observer = new Varien_Event_Observer();
     $event = new Varien_Event();
     $event->setData('history', $history);
     $event->setData('transport', $transport);
     $observer->setEvent($event);
     $observer->setData('history', $history);
     $observer->setData('transport', $transport);
     $this->_model->setRowUrl($observer);
     $this->assertContains('sales_order/view/order_id/1/', $transport->getRowUrl());
 }
开发者ID:giuseppemorelli,项目名称:firegento-adminmonitoring,代码行数:18,代码来源:Order.php

示例3: buildObserver

 /**
  * Build correct observer structure
  *
  * @param $data array
  */
 protected function buildObserver(array $data)
 {
     $observer = new Varien_Event_Observer();
     $event = new Varien_Event();
     $event->setData($data);
     $data['event'] = $event;
     $observer->setData($data);
     return $observer;
 }
开发者ID:eniuz,项目名称:FrontendMonitoring,代码行数:14,代码来源:Observer.php

示例4: testPaymentMethodIsActive

 /**
  * @test
  * @loadFixture testPaymentMethodIsActive
  */
 public function testPaymentMethodIsActive()
 {
     $model = Mage::getModel('debit/debit');
     $checkResult = new StdClass();
     $checkResult->isAvailable = true;
     $observer = new Varien_Event_Observer();
     $event = new Varien_Event();
     $event->setData('method_instance', $model);
     $event->setData('result', $checkResult);
     $observer->setData('method_instance', $model);
     $observer->setData('result', $checkResult);
     $observer->setEvent($event);
     $this->_model->paymentMethodIsActive($observer);
     $this->assertTrue($observer->getEvent()->getResult()->isAvailable);
 }
开发者ID:pette87,项目名称:Magento-DebitPayment,代码行数:19,代码来源:Observer.php


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