Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Dashboard_Endpoint | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| register_endpoint | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php // phpcs:ignore Squiz.Commenting.FileComment.Missing |
| 2 | namespace Automattic\JetpackCRM; |
| 3 | |
| 4 | defined( 'ZEROBSCRM_PATH' ) || exit( 0 ); |
| 5 | |
| 6 | /** |
| 7 | * Dashboard endpoint |
| 8 | */ |
| 9 | class Dashboard_Endpoint extends Client_Portal_Endpoint { |
| 10 | |
| 11 | public static function register_endpoint( $endpoints, $client_portal ) { // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
| 12 | $new_endpoint = new Dashboard_Endpoint( $client_portal ); |
| 13 | |
| 14 | $new_endpoint->portal = $client_portal; |
| 15 | $new_endpoint->slug = 'dashboard'; |
| 16 | $new_endpoint->name = __( 'Dashboard', 'zero-bs-crm' ); |
| 17 | $new_endpoint->hide_from_menu = false; |
| 18 | $new_endpoint->menu_order = 0; |
| 19 | $new_endpoint->icon = 'fa-dashboard'; |
| 20 | $new_endpoint->template_name = 'dashboard.php'; |
| 21 | $new_endpoint->add_rewrite_endpoint = true; |
| 22 | $new_endpoint->should_check_user_permission = true; |
| 23 | |
| 24 | $endpoints[] = $new_endpoint; |
| 25 | return $endpoints; |
| 26 | } |
| 27 | } |