/**
  * Get Document objects associated with this internship.
  */
 public function getDocuments()
 {
     $db = InternDocument::getDB();
     $db->addWhere('internship_id', $this->id);
     return $db->getObjects('\\Intern\\InternDocument');
 }
 private function setupDocumentList()
 {
     // Document list
     if (!is_null($this->docs)) {
         foreach ($this->docs as $doc) {
             $this->tpl['docs'][] = array('DOWNLOAD' => $doc->getDownloadLink('blah'), 'DELETE' => $doc->getDeleteLink());
         }
     }
     // Document upload button
     $folder = new InternFolder(InternDocument::getFolderId());
     $this->tpl['UPLOAD_DOC'] = $folder->documentUpload($this->intern->id);
 }