Example #1
0
 public function testGetHtml()
 {
     $resultHtml = '<input type="text" name="escapedHtml" ' . 'id="escapedHtml" value="escapedHtml" ' . 'class="input-text admin__control-text no-changes" data-ui-id="filter-escapedhtml"  />';
     $column = $this->getMockBuilder('Magento\\Backend\\Block\\Widget\\Grid\\Column')->setMethods(['getId', 'getHtmlId'])->disableOriginalConstructor()->getMock();
     $this->block->setColumn($column);
     $this->escaper->expects($this->any())->method('escapeHtml')->willReturn('escapedHtml');
     $column->expects($this->any())->method('getId')->willReturn('id');
     $column->expects($this->once())->method('getHtmlId')->willReturn('htmlId');
     $this->assertEquals($resultHtml, $this->block->getHtml());
 }
Example #2
0
 public function getHtml()
 {
     // TODO NOT SUPPORTED FEATURES
     if (!$this->getHelper('Component\\Ebay\\PickupStore')->isFeatureEnabled()) {
         return parent::getHtml();
     }
     $isInStorePickup = $this->getValue('is_in_store_pickup') == 1 ? 'checked="checked"' : '';
     $html = '<div class="field-100"><input type="text" name="' . $this->_getHtmlName() . '[value]"
              id="' . $this->_getHtmlId() . '" value="' . $this->getEscapedValue('value') . '"
              class="input-text no-changes"/></div>';
     return $html . '<span class="label">' . '</span><input style="margin-left:1px;float:none;width:auto !important;" type="checkbox"
              value="1" name="' . $this->_getHtmlName() . '[is_in_store_pickup]" ' . $isInStorePickup . '> ' . $this->getHelper('Module\\Translation')->__('In-Store Pickup');
 }