Ejemplo n.º 1
0
 private function prepareAssignSubPage($documentId, $collectionId)
 {
     $collection = new Opus_Collection($collectionId);
     $children = $collection->getChildren();
     if (count($children) === 0) {
         // zurück zur Ausgangsansicht
         $this->_redirectToAndExit('assign', array('failure' => 'specified collection does not have any subcollections'), 'collection', 'admin', array('document' => $documentId));
         return;
     }
     $this->view->collections = array();
     foreach ($children as $child) {
         array_push($this->view->collections, array('id' => $child->getId(), 'name' => $child->getNumberAndName(), 'hasChildren' => $child->hasChildren(), 'visible' => $child->getVisible()));
     }
     $this->view->documentId = $documentId;
     $this->view->breadcrumb = array_reverse($collection->getParents());
     $this->view->role_name = $collection->getRole()->getDisplayName();
 }