Example #1
0
 /**
  * Creates a list of nodes with children.
  *
  * @param MShop_Catalog_Item_Interface $node Catalog node
  */
 protected function _createNodeArray(MShop_Catalog_Item_Interface $node)
 {
     $result = $node->toArray();
     foreach ($node->getChildren() as $child) {
         $result['children'][] = $this->_createNodeArray($child);
     }
     return (object) $result;
 }