本文整理汇总了PHP中PDF_Common::get_ids方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF_Common::get_ids方法的具体用法?PHP PDF_Common::get_ids怎么用?PHP PDF_Common::get_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF_Common
的用法示例。
在下文中一共展示了PDF_Common::get_ids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_notification
public static function do_notification($notification, $form, $entry)
{
/*
* Allow the template/function access to these variables
*/
global $gfpdf, $form_id, $lead_id;
$notification_name = isset($notification['name']) ? $notification['name'] : '';
/*
* Set data used to determine if PDF needs to be created and attached to notification
* Don't change anything here.
*/
$form_title = $form['title'];
$form_id = $entry['form_id'];
$lead_id = apply_filters('gfpdfe_lead_id', $entry['id'], $form, $entry, $gfpdf);
/* allow premium plugins to override the lead ID */
/*
* Before setting up PDF options we will check if a configuration is found
* If not, we will set up defaults defined in configuration.php
*/
self::check_configuration($form_id);
/*
* Check if form is in configuration
*/
if (!($config = $gfpdf->get_config($form_id))) {
return $notification;
}
/* set up the correct lead IDs */
PDF_Common::get_ids();
/*
* To have our configuration indexes so loop through the PDF template configuration
* and generate and attach PDF files.
*/
foreach ($config as $index) {
$template = isset($gfpdf->configuration[$index]['template']) ? $gfpdf->configuration[$index]['template'] : '';
/* Get notifications user wants PDF attached to and check if the correct notifications hook is running */
$notifications = self::get_form_notifications($form, $index);
/*
* Premium plugin filter
* Allows manual override of the notification
* Allows the multi-report plugin to automate PDFs based on weekly/fortnightly/monthly basis
* Only allow boolean to be returned
*/
$notification_override = (bool) apply_filters('gfpdfe_notification_override', false, $notification_name, $notifications, $form, $entry, $gfpdf);
if (self::check_notification($notification_name, $notifications) || $notification_override === true) {
/* only generate the PDF is attaching to notification */
$pdf_arguments = self::generate_pdf_parameters($index, $form_id, $lead_id, $template);
/* generate and save default PDF */
$filename = $gfpdf->render->PDF_Generator($form_id, $lead_id, $pdf_arguments);
$notification['attachments'][] = $filename;
}
}
return $notification;
}