| 1 |
/** |
| 2 |
* Internal dependencies |
| 3 |
*/ |
| 4 |
import { BaseWordPressProvider } from '../common/providers/base-wordpress-provider'; |
| 5 |
|
| 6 |
/** |
| 7 |
* DashboardProvider class for the plugin's dashboard. |
| 8 |
* |
| 9 |
* Extends the BaseWordPressProvider to inherit WordPress REST API functionalities. |
| 10 |
* |
| 11 |
* @since 3.19.0 |
| 12 |
*/ |
| 13 |
export class DashboardProvider extends BaseWordPressProvider { |
| 14 |
/** |
| 15 |
* The singleton instance of the DashboardProvider. |
| 16 |
* |
| 17 |
* @since 3.19.0 |
| 18 |
*/ |
| 19 |
protected static instance: DashboardProvider; |
| 20 |
|
| 21 |
/** |
| 22 |
* Returns the singleton instance of the DashboardProvider. |
| 23 |
* |
| 24 |
* @since 3.19.0 |
| 25 |
* |
| 26 |
* @return {DashboardProvider} The singleton instance. |
| 27 |
*/ |
| 28 |
public static getInstance(): DashboardProvider { |
| 29 |
if ( ! DashboardProvider.instance ) { |
| 30 |
DashboardProvider.instance = new DashboardProvider(); |
| 31 |
} |
| 32 |
return DashboardProvider.instance; |
| 33 |
} |
| 34 |
} |
| 35 |
|