UserPermissionsInterface.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Framework\Permissions\Contracts; |
| 4 | |
| 5 | /** |
| 6 | * @since 4.14.0 |
| 7 | */ |
| 8 | interface UserPermissionsInterface |
| 9 | { |
| 10 | /** |
| 11 | * Get the capability type (e.g., 'give_form', 'give_payment'). |
| 12 | * |
| 13 | * @since 4.14.0 |
| 14 | */ |
| 15 | public static function getType(): string; |
| 16 | |
| 17 | /** |
| 18 | * Check if user can create. |
| 19 | * |
| 20 | * @since 4.14.0 |
| 21 | */ |
| 22 | public function canCreate(): bool; |
| 23 | |
| 24 | /** |
| 25 | * Check if user can view/read. |
| 26 | * |
| 27 | * @since 4.14.0 |
| 28 | */ |
| 29 | public function canView(): bool; |
| 30 | |
| 31 | /** |
| 32 | * Check if user can edit. |
| 33 | * |
| 34 | * @since 4.14.0 |
| 35 | */ |
| 36 | public function canEdit(): bool; |
| 37 | |
| 38 | /** |
| 39 | * Check if user can delete. |
| 40 | * |
| 41 | * @since 4.14.0 |
| 42 | */ |
| 43 | public function canDelete(): bool; |
| 44 | } |
| 45 |