| 1 |
<?php |
| 2 |
/** |
| 3 |
* User capability context for WP Crontrol. |
| 4 |
* |
| 5 |
* @package wp-crontrol |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace Crontrol\Context; |
| 9 |
|
| 10 |
/** |
| 11 |
* Interface for checking user capabilities. |
| 12 |
* |
| 13 |
* Provides methods to check if the current user has permission to perform |
| 14 |
* various operations on different types of cron events. |
| 15 |
*/ |
| 16 |
interface UserContext { |
| 17 |
/** |
| 18 |
* Check if the user can create PHP cron events. |
| 19 |
*/ |
| 20 |
public function can_create_php_cron_events(): bool; |
| 21 |
|
| 22 |
/** |
| 23 |
* Check if the user can edit PHP cron events. |
| 24 |
*/ |
| 25 |
public function can_edit_php_cron_events(): bool; |
| 26 |
|
| 27 |
/** |
| 28 |
* Check if the user can delete PHP cron events. |
| 29 |
*/ |
| 30 |
public function can_delete_php_cron_events(): bool; |
| 31 |
|
| 32 |
/** |
| 33 |
* Check if the user can run PHP cron events. |
| 34 |
*/ |
| 35 |
public function can_run_php_cron_events(): bool; |
| 36 |
|
| 37 |
/** |
| 38 |
* Check if the user can create URL cron events. |
| 39 |
*/ |
| 40 |
public function can_create_url_cron_events(): bool; |
| 41 |
|
| 42 |
/** |
| 43 |
* Check if the user can edit URL cron events. |
| 44 |
*/ |
| 45 |
public function can_edit_url_cron_events(): bool; |
| 46 |
|
| 47 |
/** |
| 48 |
* Check if the user can delete URL cron events. |
| 49 |
*/ |
| 50 |
public function can_delete_url_cron_events(): bool; |
| 51 |
|
| 52 |
/** |
| 53 |
* Check if the user can run URL cron events. |
| 54 |
*/ |
| 55 |
public function can_run_url_cron_events(): bool; |
| 56 |
|
| 57 |
/** |
| 58 |
* Check if the user can create standard cron events. |
| 59 |
*/ |
| 60 |
public function can_create_standard_cron_events(): bool; |
| 61 |
|
| 62 |
/** |
| 63 |
* Check if the user can edit standard cron events. |
| 64 |
*/ |
| 65 |
public function can_edit_standard_cron_events(): bool; |
| 66 |
|
| 67 |
/** |
| 68 |
* Check if the user can delete standard cron events. |
| 69 |
*/ |
| 70 |
public function can_delete_standard_cron_events(): bool; |
| 71 |
|
| 72 |
/** |
| 73 |
* Check if the user can run standard cron events. |
| 74 |
*/ |
| 75 |
public function can_run_standard_cron_events(): bool; |
| 76 |
} |
| 77 |
|