コード例 #1
0
 /**
  * Get Document objects associated with this internship.
  */
 public function getDocuments()
 {
     $db = InternDocument::getDB();
     $db->addWhere('internship_id', $this->id);
     return $db->getObjects('\\Intern\\InternDocument');
 }
コード例 #2
0
 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);
 }