/**
  * action new
  * 
  * @return void
  */
 public function newAction()
 {
     $query = $this->partnerRepository->createQuery();
     $query->getQuerySettings()->setLanguageUid(0);
     $query->getQuerySettings()->setStoragePageIds([11]);
     $result = $query->execute();
     /*
     $partners = [];
     foreach ($result as $entry) {
         $partner = new \stdClass();
         $partner->value = $entry->getName();
         $partner->key = $entry->getUid();
         $partners[] = $partner;
     }
     
     $this->view->assign('partners', $partners);
     */
     $this->view->assign('partners', $result);
 }
示例#2
0
 /**
  * action show
  * 
  * @param \Gigabonus\Gbpartner\Domain\Model\Category $category
  * @return void
  */
 public function showAction(\Gigabonus\Gbpartner\Domain\Model\Category $category = null)
 {
     if ($category === NULL) {
         DebuggerUtility::var_dump($this->partnerRepository->findAll());
         return;
     }
     // DebuggerUtility::var_dump($this->partnerRepository->findByCategory($category));
     $query = $this->partnerRepository->createQuery();
     // $query->getQuerySettings()->setIgnoreEnableFields(true);
     $query->getQuerySettings()->setRespectSysLanguage(false);
     // $query->getQuerySettings()->setRespectStoragePage(FALSE);
     // $query = $query->matching($query->logicalNot($query->equals('image', 0)));
     $result = $query->execute();
     // DebuggerUtility::var_dump($result);
     /*
     $object = NULL;
     if (count($result) > 0) {
         $object = $result->getFirst();
         $this->identityMap->registerObject($object, $uid);
     }
     */
     /*
     foreach ($category as $item) {
         
     }
     
     $header = $content->getHeader();
     */
     /*
     $categoryId = $category->getUid();
     $query = $this->partnerRepository->createQuery();
     $query->matching($query->like('category', $categoryId));
     DebuggerUtility::var_dump($query->execute());
     */
     $this->view->assign('category', $category);
 }
示例#3
0
 /**
  * action list
  * 
  * @return void
  */
 public function listAction()
 {
     $partners = $this->partnerRepository->findAll();
     $this->view->assign('partners', $partners);
 }