コード例 #1
0
 protected function _construct()
 {
     parent::_construct();
     //Only in case that the form is loaded in the backend, use a special template
     if (false === Mage::getModel("ops/config")->isFrontendEnvironment()) {
         $this->setTemplate(self::BACKEND_TEMPLATE);
     }
 }
コード例 #2
0
ファイル: Credit.php プロジェクト: roshu1980/add-computers
 /**
  * Init OPS payment form
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate(self::FRONTEND_TEMPLATE);
 }
コード例 #3
0
ファイル: Alias.php プロジェクト: roshu1980/add-computers
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('ops/form/alias.phtml');
 }
コード例 #4
0
ファイル: FormTest.php プロジェクト: roshu1980/add-computers
 public function testIsUserNotRegistering()
 {
     $dataHelperMock = $this->getHelperMock('ops/data', array('checkIfUserIsNotRegistering'));
     $dataHelperMock->expects($this->any())->method('checkIfUserIsNotRegistering')->will($this->returnValue(false));
     $this->replaceByMock('helper', 'ops/data', $dataHelperMock);
     $block = new Netresearch_OPS_Block_Form();
     $this->assertFalse($block->isUserNotRegistering());
 }