Skip to content

Instantly share code, notes, and snippets.

@jakejackson1
Last active February 22, 2016 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakejackson1/3554f5f7885aa08b19dd to your computer and use it in GitHub Desktop.
Save jakejackson1/3554f5f7885aa08b19dd to your computer and use it in GitHub Desktop.
PDF Template Configuration file for our Hello World Tutorial
<?php
namespace GFPDF\Templates\Config;
use GFPDF\Helper\Helper_Interface_Config;
/**
* Configuration file for hello-world.php
*/
/* Exit if accessed directly */
if ( ! defined('ABSPATH') ) {
exit;
}
/**
* 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)
*
* For instance, a template called core-simple.php or core_simple.php would have a configuration class of "Core_Simple"
*
* This naming convention is very important, otherwise the software cannot correctly load the configuration
*/
class Hello_World implements Helper_Interface_Config {
/**
* Return the templates configuration structure which control what extra fields will be shown in the "Template" tab when configuring a form's PDF.
*
* @return array The array, split into core components and custom fields
*
* @since 4.0
*/
public function configuration() {
return array(
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment