当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF_Common::get_ids方法代码示例

本文整理汇总了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;
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:53,代码来源:pdf.php


注:本文中的PDF_Common::get_ids方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。