GFPDFControllerController_Mergetags

Controller_Mergetags Handles the PDF display and authentication.

Defined (1)

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

/src/controller/Controller_Mergetags.php  
  1. class Controller_Mergetags extends Helper_Abstract_Controller implements Helper_Interface_Filters { 
  2.  
  3. /** 
  4. * Setup our class by injecting all our dependancies 
  5. * @param Helper_Abstract_Model|\GFPDF\Model\Model_Shortcodes $model Our Shortcodes Model the controller will manage 
  6. * @since 4.0 
  7. */ 
  8. public function __construct( Helper_Abstract_Model $model ) { 
  9.  
  10. /** Load our model and view */ 
  11. $this->model = $model; 
  12. $this->model->setController( $this ); 
  13.  
  14. /** 
  15. * Initialise our class defaults 
  16. * @since 4.1 
  17. * @return void 
  18. */ 
  19. public function init() { 
  20. $this->add_filters(); 
  21.  
  22. /** 
  23. * Apply any filters needed for the settings page 
  24. * @since 4.1 
  25. * @return void 
  26. */ 
  27. public function add_filters() { 
  28. add_filter( 'gform_replace_merge_tags', [ $this->model, 'process_pdf_mergetags' ], 10, 4 ); 
  29. add_filter( 'gform_custom_merge_tags', [ $this->model, 'add_pdf_mergetags' ], 10, 2 );