GFPDFViewView_Actions

Controls the Gravity PDF Actions Display.

Defined (1)

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

/src/view/View_Actions.php  
  1. class View_Actions extends Helper_Abstract_View { 
  2. /** 
  3. * Set the view's name 
  4. * @var string 
  5. * @since 4.0 
  6. */ 
  7. protected $view_type = 'Actions'; 
  8.  
  9. /** 
  10. * Add our primary button and an opt-our dismissal button 
  11. * @param string $type The action ID 
  12. * @param string $button_text The primary button text 
  13. * @param string $dismissal Whether the dismissal button should be shown. Valid arguments are 'enabled' or 'disabled' 
  14. * @return string The action_buttons HTML 
  15. * @since 4.0 
  16. */ 
  17. public function get_action_buttons( $type, $button_text, $dismissal = 'enabled' ) { 
  18.  
  19. return $this->load( 'action_buttons', [ 
  20. 'type' => $type,  
  21. 'button_text' => $button_text,  
  22. 'dismissal' => $dismissal,  
  23. ], false ); 
  24.  
  25.  
  26. /** 
  27. * Load our Review Plugin Notice 
  28. * @param string $type The action ID 
  29. * @param string $button_text The primary button text 
  30. * @return string The notice HTML 
  31. * @since 4.0 
  32. */ 
  33. public function review_plugin( $type, $button_text ) { 
  34.  
  35. $html = $this->load( 'review_plugin', [], false ); 
  36. $html .= $this->get_action_buttons( $type, $button_text ); 
  37.  
  38. return $html; 
  39.  
  40. /** 
  41. * Load our v3 to v4 Migration Notice 
  42. * @param string $type The action ID 
  43. * @param string $button_text The primary button text 
  44. * @return string The notice HTML 
  45. * @since 4.0 
  46. */ 
  47. public function migration( $type, $button_text ) { 
  48.  
  49. $html = $this->load( 'migration', [], false ); 
  50. $html .= $this->get_action_buttons( $type, $button_text, 'disabled' ); 
  51.  
  52. return $html;