/**
  * action menu
  *
  * @param \WHO\WhoShop\Domain\Model\Category $category
  * @return void
  */
 public function menuAction(\WHO\WhoShop\Domain\Model\Category $category = NULL)
 {
     $this->getArguments = $_GET;
     if ($category == NULL && isset($this->getArguments['tx_whoshop_product']['category']) && $this->getArguments['tx_whoshop_product']['category'] != NULL) {
         $category = $this->categoryRepository->findByUid($this->getArguments['tx_whoshop_product']['category']);
         $this->isProductDetailView = 1;
     }
     if ($this->settings['isContentCatNav'] && $category != NULL) {
         $this->settings['rootParent'] = $category->getUid();
     } elseif ($this->settings['isNavSecondary'] && $category != NULL) {
         $this->settings['rootParent'] = $category->getParent()->getUid();
     }
     if ($category == NULL) {
         $givenCat = NULL;
         $catGiven = 0;
     } else {
         $catGiven = 1;
         $givenCat = $category->getUid();
     }
     $firstLevelCategories = $this->categoryRepository->findAllFirstLevelByPid($this->settings['storagePid'], $this->settings['rootParent']);
     $this->addChildren($firstLevelCategories, $this->settings['maxMenuDepth'], 0);
     $this->categories = $firstLevelCategories;
     $unsortedCategories = $this->categoryRepository->findAll();
     $assignArray = array('isProductDetailView' => $this->isProductDetailView, 'catGiven' => $catGiven, 'givenCat' => $givenCat, 'categories' => $this->categories, 'unsortedCategories' => $unsortedCategories);
     //DebuggerUtility::var_dump($assignArray);
     $this->view->assignMultiple($assignArray);
 }
 /**
  * action list
  *
  * @return void
  */
 public function listAction()
 {
     $childList = array();
     $category = $this->categoryRepository->findByUid($_GET['tx_whoshop_category']['category']);
     DebuggerUtility::var_dump($category);
     $this->getCatUidListRecursive($category, $childList);
     DebuggerUtility::var_dump($childList, 'childList');
     if ($category == NULL) {
         $category = $this->categoryRepository->findByUid($this->settings['defaultCategory']);
     }
     $products = $this->productRepository->findByCat($category);
     $productsArray = $products->toArray();
     if (empty($productsArray) && !empty($childList)) {
         DebuggerUtility::var_dump('products empty');
         $products = $this->productRepository->findByCatList($childList);
     }
     DebuggerUtility::var_dump($products, 'Produkte');
     $this->view->assign('products', $products);
     $this->view->assign('category', $category);
 }