| 1 |
<?php |
| 2 |
|
| 3 |
namespace NotificationX\Core; |
| 4 |
|
| 5 |
use NotificationX\Admin\Admin; |
| 6 |
use NotificationX\GetInstance; |
| 7 |
|
| 8 |
/** |
| 9 |
* @method static Dashboard get_instance($args = null) |
| 10 |
*/ |
| 11 |
class Dashboard { |
| 12 |
|
| 13 |
/** |
| 14 |
* Instance of QuickBuild |
| 15 |
* |
| 16 |
* @var QuickBuild |
| 17 |
*/ |
| 18 |
use GetInstance; |
| 19 |
|
| 20 |
/** |
| 21 |
* Initially Invoked when initialized. |
| 22 |
* |
| 23 |
* @hook init |
| 24 |
*/ |
| 25 |
public function __construct() { |
| 26 |
add_action( 'admin_menu', [ $this, 'menu' ], 30 ); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* This method is responsible for Admin Menu of |
| 31 |
* NotificationX |
| 32 |
* |
| 33 |
* @return void |
| 34 |
*/ |
| 35 |
public function menu() { |
| 36 |
add_submenu_page( 'nx-admin', __( 'Dashboard', 'notificationx' ), __( 'Dashboard', 'notificationx' ), 'read_notificationx', 'nx-dashboard', [ Admin::get_instance(), 'views' ], 0 ); |
| 37 |
} |
| 38 |
|
| 39 |
} |
| 40 |
|