GFPDFTemplatesConfigFocus_Gravity

The configuration class name should be the same name as the PHP template file name with the following modifications: The file extension is omitted (.php) Any hyphens (-) should be replaced with underscores (_) The class name should be in sentence case (the first character of each word separated by a hyphen (-) or underscore (_) should be uppercase).

Defined (1)

The class is defined in the following location(s).

/src/templates/config/focus-gravity.php  
  1. class Focus_Gravity implements Helper_Interface_Config { 
  2.  
  3. /** 
  4. * Return the templates configuration structure which control what extra fields will be shown in the "Template" tab when configuring a form's PDF. 
  5. * The fields key is based on our \GFPDF\Helper\Helper_Abstract_Options Settings API 
  6. * See the Helper_Options_Fields::register_settings() method for the exact fields that can be passed in 
  7. * @return array The array, split into core components and custom fields 
  8. * @since 4.0 
  9. */ 
  10. public function configuration() { 
  11.  
  12. return [ 
  13.  
  14. /** Enable core fields */ 
  15. 'core' => [ 
  16. 'show_form_title' => true,  
  17. 'show_page_names' => true,  
  18. 'show_html' => true,  
  19. 'show_section_content' => true,  
  20. 'enable_conditional' => true,  
  21. 'show_empty' => true,  
  22. 'header' => true,  
  23. 'first_header' => true,  
  24. 'footer' => true,  
  25. 'first_footer' => true,  
  26. 'background_color' => true,  
  27. 'background_image' => true,  
  28. ],  
  29.  
  30. /** Create custom fields to control the look and feel of a template */ 
  31. 'fields' => [ 
  32. 'focusgravity_accent_colour' => [ 
  33. 'id' => 'focusgravity_accent_colour',  
  34. 'name' => esc_html__( 'Accent Color', 'gravity-forms-pdf-extended' ),  
  35. 'type' => 'color',  
  36. 'desc' => esc_html__( 'The accent color is used for the page and section titles, as well as the border.', 'gravity-forms-pdf-extended' ),  
  37. 'std' => '#e3e3e3',  
  38. ],  
  39.  
  40. 'focusgravity_secondary_colour' => [ 
  41. 'id' => 'focusgravity_secondary_colour',  
  42. 'name' => esc_html__( 'Secondary Color', 'gravity-forms-pdf-extended' ),  
  43. 'type' => 'color',  
  44. 'desc' => esc_html__( 'The secondary color is used with the field labels and for alternate rows.', 'gravity-forms-pdf-extended' ),  
  45. 'std' => '#eaf2fa',  
  46. ],  
  47.  
  48. 'focusgravity_label_format' => [ 
  49. 'id' => 'focusgravity_label_format',  
  50. 'name' => esc_html__( 'Format', 'gravity-forms-pdf-extended' ),  
  51. 'type' => 'radio',  
  52. 'desc' => esc_html__( 'Combine the field label and value or have a distinct label/value.', 'gravity-forms-pdf-extended' ),  
  53. 'options' => [ 
  54. 'combined_label' => esc_html__( 'Combined Label', 'gravity-forms-pdf-extended' ),  
  55. 'split_label' => esc_html__( 'Split Label', 'gravity-forms-pdf-extended' ),  
  56. ],  
  57. 'std' => 'combined_label',  
  58. ],  
  59. ],  
  60. ];