コード例 #1
0
 /**
  * Download multiple certificates as ZIP file
  *
  */
 public function downloadCertificates()
 {
     $cert_ids = (array) $_POST['cert_id'];
     $ids = array();
     foreach ($cert_ids as $cert_id) {
         /** @var srCertificate $certificate */
         $certificate = srCertificate::find($cert_id);
         if ($certificate && $certificate->getDefinitionId() == $this->definition->getId()) {
             $ids[] = $cert_id;
         }
     }
     if (count($ids)) {
         srCertificate::downloadAsZip($ids, $this->ref_id . '-certificates');
     }
     $this->showCertificates();
 }
コード例 #2
0
 /**
  * Download multiple certificates as ZIP file
  *
  */
 public function downloadCertificates()
 {
     $cert_ids = isset($_POST['cert_id']) ? (array) $_POST['cert_id'] : array();
     srCertificate::downloadAsZip($cert_ids);
     $this->index();
 }