/** * Update image and previewpdf of all fiels using main pdf. * * @author Kuldeep Dangi <*****@*****.**> */ public function actionUpdateNotesPdf() { $notesObj = new Extensions(); $allNotesArray = array(); if (!empty($_GET['id'])) { $allNotesArray[] = $notesObj->findByPk($_GET['id']); } else { $allNotesArray = $notesObj->findAll(); } foreach ($allNotesArray as $note) { $fileNames = array('image' => str_replace('upload_file/images/', '', $note->image), 'pdf' => $note->pdf, 'pdfPreview' => $note->imagepdf); echo '**** Processing for Note ID - ' . $note->extension_id . '********** <br/>'; $this->processPdf($fileNames); echo '**** Processing Completed. **********<br/>'; } }