| 1 | <?php |
||
| 13 | trait RegistrationsAdmin |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * This will select all checkboxes on a registration list table for the given array of |
||
| 18 | * registration ids. |
||
| 19 | * Assumes the actor is on a list table page for registrations. |
||
| 20 | * @param $registration_ids |
||
| 21 | */ |
||
| 22 | public function selectBulkActionCheckboxesForRegistrationIds(array $registration_ids) |
||
| 30 | |||
| 31 | |||
| 32 | /** |
||
| 33 | * Navigates the actor to the default registration list table page. |
||
| 34 | * @param string $additional_params |
||
| 35 | */ |
||
| 36 | public function amOnDefaultRegistrationsListTableAdminPage($additional_params = '') |
||
| 42 | } |
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idableprovides a methodequalsIdthat in turn relies on the methodgetId(). If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()as an abstract method to the trait will make sure it is available.