Example #1
0
 /**
  * Import a sample structure, suitable for testing elements sort order
  */
 protected function _populateSampleSortStructure()
 {
     $child = array(\Magento\Framework\Data\Structure::PARENT => 'parent');
     $this->_structure->importElements(array('parent' => array(\Magento\Framework\Data\Structure::CHILDREN => array('one' => 'e1', 'two' => 'e2', 'three' => 'e3', 'four' => 'e4', 'five' => 'e5')), 'one' => $child, 'two' => $child, 'three' => $child, 'four' => $child, 'five' => $child, 'x' => array()));
 }
 /**
  * Import a sample structure, suitable for testing elements sort order
  * @return void
  */
 protected function _populateSampleSortStructure()
 {
     $child = [\Magento\Framework\Data\Structure::PARENT => 'parent'];
     $this->_structure->importElements(['parent' => [\Magento\Framework\Data\Structure::CHILDREN => ['one' => 'e1', 'two' => 'e2', 'three' => 'e3', 'four' => 'e4', 'five' => 'e5']], 'one' => $child, 'two' => $child, 'three' => $child, 'four' => $child, 'five' => $child, 'x' => []]);
 }
Example #3
0
 /**
  * Layout xml generation
  *
  * @return $this
  */
 public function generateXml()
 {
     $xml = $this->getUpdate()->asSimplexml();
     $this->setXml($xml);
     $this->_structure->importElements(array());
     return $this;
 }