예제 #1
0
 protected function setUp()
 {
     $factoryMock = $this->getMock('\\Magento\\Framework\\Data\\Form\\Element\\Factory', [], [], '', false);
     $collectionFactoryMock = $this->getMock('\\Magento\\Framework\\Data\\Form\\Element\\CollectionFactory', [], [], '', false);
     $escaperMock = $this->getMock('\\Magento\\Framework\\Escaper', [], [], '', false);
     $this->_model = new \Magento\Framework\Data\Form\Element\Text($factoryMock, $collectionFactoryMock, $escaperMock);
     $formMock = new \Magento\Framework\DataObject();
     $formMock->getHtmlIdPrefix('id_prefix');
     $formMock->getHtmlIdPrefix('id_suffix');
     $this->_model->setForm($formMock);
 }
예제 #2
0
 /**
  * Set form for both fields
  *
  * @param Form $form
  * @return $this
  */
 public function setForm($form)
 {
     $this->weightSwitcher->setForm($form);
     return parent::setForm($form);
 }
예제 #3
0
 /**
  * Set form to quantity element in addition to current element
  *
  * @param Form $form
  * @return Form
  */
 public function setForm($form)
 {
     $this->_qty->setForm($form);
     return parent::setForm($form);
 }
예제 #4
0
파일: Weight.php 프로젝트: nja78/magento2
 /**
  * Set form for both fields
  *
  * @param Form $form
  * @return $this
  */
 public function setForm($form)
 {
     $this->_virtual->setForm($form);
     return parent::setForm($form);
 }