public function indexAction() { $title = $this->getType() == '2' ? 'Materiały dla członków spółdzielni' : 'Dokumenty do pobrania'; if ($this->isArchive) { $title .= ' - Archiwum'; } $this->setTitle($title); $this->setUrl('dokumenty.html'); $dbService = new Wsm_Db_Documents(); $this->addToView('list', $dbService->getList($this->getType(), null, $this->isArchive)); $this->addToView('type', $this->getType()); $hasArchive = $dbService->hasArchive($this->getType()); $this->addToView('showArchiveLink', !$this->isArchive && $hasArchive); }