Exemplo n.º 1
0
 /**
  * @param \Orm\Zed\Category\Persistence\SpyCategory $category
  * @param \Generated\Shared\Transfer\LocaleTransfer $locale
  *
  * @return array
  */
 protected function getBlocks(SpyCategory $category, LocaleTransfer $locale)
 {
     $blockList = [];
     foreach ($category->getNodes() as $node) {
         $children = $this->getCategoryChildren($node->getIdCategoryNode(), $locale);
         foreach ($children as $child) {
             $childBlockList = $this->getBlockDataForView($category, $child);
             $blockList = array_merge($childBlockList, $blockList);
         }
     }
     return $blockList;
 }