Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SampleRow.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Block\Form;
9 use Magento\Mtf\Client\ElementInterface;
10 
14 class SampleRow extends Form
15 {
21  protected $sortDraggableHandle = '*[class=draggable-handle]';
22 
29  public function fillSampleRow(array $fields)
30  {
31  $mapping = $this->dataMapping($fields);
32  $this->_fill($mapping);
33  }
34 
41  public function getDataSampleRow(array $fields)
42  {
43  $mapping = $this->dataMapping($fields);
44  return $this->_getData($mapping);
45  }
46 
53  public function dragAndDropTo(ElementInterface $target)
54  {
55  $this->getSortHandle()->dragAndDrop($target);
56  }
57 
63  public function getSortHandle()
64  {
65  return $this->_rootElement->find($this->sortDraggableHandle);
66  }
67 }
$target
Definition: skip.phtml:8
$fields
Definition: details.phtml:14