You can override this class for register and manage your own components
Author: =undo= (info@wpxtre.me)
 /**
  * Create an instance of WPDKUIModalDialogTour class
  *
  * @brief Construct
  *
  * @return WPDKUIModalDialogTour
  */
 public function __construct($id, $title)
 {
     // Remember, change the id to reopen this dialog tour
     parent::__construct($id, $title);
     // Permanent dismiss
     $this->permanent_dismiss = true;
     if (false === $this->is_dismissed() && 0 === did_action('wpxm_open_tour')) {
         // Enqueue page view
         WPDKUIComponents::init()->enqueue(WPDKUIComponents::PAGE);
     }
 }
 /**
  * This method is called when the head of this view controller is loaded by WordPress.
  * It is used by WPDKMenu for example, as 'admin_head-' action.
  *
  * @brief Head
  * @since 1.4.18
  */
 public function _admin_head()
 {
     WPDKUIComponents::init()->enqueue(WPDKUIComponents::PREFERENCES);
 }
Exemple #3
0
 /**
  * Create an instance of WPDKUITableView class
  *
  * @patam string $id The view id.
  *
  * @return WPDKUITableView
  */
 public function __construct($id)
 {
     parent::__construct($id, 'wpdk-ui-table-view');
     // Enqueue component
     WPDKUIComponents::init()->enqueue(WPDKUIComponents::TABLE);
 }
 /**
  * The child class should call this constructor from it's own constructor.
  * Create an instance of WPDKListTableViewController class
  *
  * @brief  Constructor
  *
  * @param string $id    List table id
  * @param string $title Title of view controller
  * @param array  $args  Standard WP_List_Table args
  *
  * @return WPDKListTableViewController
  *
  */
 public function __construct($id, $title, $args)
 {
     // Create an instance of WP_List_Table class
     parent::__construct($args);
     // @since 1.5.16 - Default WPDK args
     $defaults = array('wpdk_request_status' => 'status', 'wpdk_default_status' => WPDKDBTableRowStatuses::ALL, 'wpdk_default_action' => WPDKDBListTableModel::ACTION_EDIT);
     // Set static properties.
     $this->id = sanitize_key($id);
     $this->title = $title;
     $this->args = wp_parse_args($args, $defaults);
     // Init the internal view controller.
     $this->viewController = new WPDKViewController($this->id, $this->title);
     $this->viewController->view->class[] = 'wpdk-list-table-box';
     // Do an action used to get the post data from model
     $action = get_class($this->model) . '-listtable-viewcontroller';
     // Filter the query args for redirect after an actions.
     add_filter('wpdk_list_table_remove_query_args_redirect', array($this, 'wpdk_list_table_remove_query_args_redirect'));
     // This action must be call one time only
     if (!did_action($action)) {
         /**
          * Fires when this view controller is loaded.
          *
          * This action is compose in '{view controller clss name}-listtable-viewcontroller'.
          *
          */
         do_action($action);
     }
     // Enqueue components
     WPDKUIComponents::init()->enqueue(WPDKUIComponents::LIST_TABLE);
 }
Exemple #5
0
 /**
  * Create an instance of WPDKDynamicTableView class
  *
  * @brief Construct
  *
  * @param string $id      ID for this dynamic table
  *
  * @return WPDKDynamicTableView
  */
 public function __construct($id)
 {
     parent::__construct($id);
     // Added dynamic
     $this->columns[self::COLUMN_ROW_MANAGE] = '';
     // Enqueue components
     WPDKUIComponents::init()->enqueue(WPDKUIComponents::DYNAMIC_TABLE);
 }