-
-
Save jakejackson1/0c6092dbd0b18c098c39bdacff18bc99 to your computer and use it in GitHub Desktop.
PDF Template Configuration file for our Hello World Tutorial, updated for v6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace GFPDF\Templates\Config; | |
use GFPDF\Helper\Helper_Interface_Config; | |
use GFPDF\Helper\Helper_Interface_Setup_TearDown; | |
use GFPDF\Helper\Helper_Abstract_Config_Settings; | |
/* Exit if accessed directly */ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Class Hello_World | |
* | |
* @package GFPDF\Templates\Config | |
* | |
* @Internal See https://docs.gravitypdf.com/v6/developers/template-configuration-and-image for more information about this class | |
*/ | |
class Hello_World extends Helper_Abstract_Config_Settings implements Helper_Interface_Config, Helper_Interface_Setup_TearDown { | |
/** | |
* Runs when the template is initially installed via the PDF Template Manager | |
* | |
* @Internal Great for installing custom fonts you've shipped with your template. | |
* @Internal Recommend creating the directory structure /install/Hello_World/ for bundled fonts | |
*/ | |
public function setUp() { | |
} | |
/** | |
* Runs when the template is deleted via the PDF Template Manager | |
* | |
* @Internal Great for cleaning up any additional directories | |
*/ | |
public function tearDown() { | |
} | |
/** | |
* 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 | |
*/ | |
public function configuration() { | |
return [ | |
/* Enable core fields */ | |
'core' => [ | |
], | |
/* Create custom fields to control the look and feel of a template */ | |
'fields' => [ | |
], | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment