當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。