MS_Dialog

Abstract class for all Dialog-Views.

Defined (1)

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

/app/class-ms-dialog.php  
  1. class MS_Dialog extends MS_Controller { 
  2.  
  3. /** 
  4. * The Dialog title 
  5. * @since 1.0.0 
  6. * @type string 
  7. */ 
  8. public $title = ''; 
  9.  
  10. /** 
  11. * Height of the dialog contents 
  12. * @since 1.0.0 
  13. * @type int 
  14. */ 
  15. public $height = 100; 
  16.  
  17. /** 
  18. * Width of the dialog contents 
  19. * @since 1.0.1.0 
  20. * @type int 
  21. */ 
  22. public $width = 0; 
  23.  
  24. /** 
  25. * The dialog contents (HTML Code) 
  26. * @since 1.0.0 
  27. * @type string 
  28. */ 
  29. public $content = ''; 
  30.  
  31. /** 
  32. * If the dialog is modal 
  33. * @since 1.0.0 
  34. * @type bool 
  35. */ 
  36. public $modal = true; 
  37.  
  38. /** 
  39. * Constructor. 
  40. * @since 1.0.0 
  41. */ 
  42. public function __construct() { 
  43. $this->title = ''; 
  44. $this->height = 100; 
  45. $this->content = ''; 
  46.  
  47. /** 
  48. * Actions to execute when constructing the parent View. 
  49. * @since 1.0.0 
  50. * @param object $this The MS_Dialog object. 
  51. */ 
  52. do_action( 'ms_dialog_construct', $this ); 
  53.  
  54. /** 
  55. * Must be overwritten in each dialog. 
  56. * Prepare and populate the members: 
  57. * $this->title 
  58. * $this->height 
  59. * $this->content 
  60. * @since 1.0.0 
  61. * @abstract 
  62. */ 
  63. public function prepare() { 
  64. /** This function is implemented different in each child class. */ 
  65.  
  66. /** 
  67. * Must be overwritten in each dialog. 
  68. * Saves form data that was displayed in the dialog. 
  69. * @since 1.0.0 
  70. * @abstract 
  71. */ 
  72. public function submit() { 
  73. /** This function is implemented different in each child class. */ 
  74.