Skip to content

Instantly share code, notes, and snippets.

@jakejackson1 jakejackson1/hello-world.php Secret
Last active Feb 22, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.