|
Bristol SU Support Package
|


Public Member Functions | |
| firstFor (int $activityId, string $resourceType, int $resourceId) | |
| create (int $activityId, string $resourceType, int $resourceId, string $name, ?string $description) | |
| getById ($id) | |
| allFor (int $activityId, string $resourceType, int $resourceId) | |
| allForActivity (int $activityId) | |
Repository for an eloquent-based activity instance.
Definition at line 11 of file ActivityInstanceRepository.php.
| BristolSU\Support\ActivityInstance\ActivityInstanceRepository::allFor | ( | int | $activityId, |
| string | $resourceType, | ||
| int | $resourceId | ||
| ) |
Get all activity instances with the given parameters
| int | $activityId | ID of the activity to which the activity instances should belong |
| string | $resourceType | Resource (owner) type. One of user, group or role. |
| int | $resourceId | Resource (owner) id. ID of the model in resource type. |
Implements BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository.
Definition at line 73 of file ActivityInstanceRepository.php.
| BristolSU\Support\ActivityInstance\ActivityInstanceRepository::allForActivity | ( | int | $activityId | ) |
Get all activity instances belonging to an activity
| int | $activityId | ID Of the activity |
Implements BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository.
Definition at line 89 of file ActivityInstanceRepository.php.
| BristolSU\Support\ActivityInstance\ActivityInstanceRepository::create | ( | int | $activityId, |
| string | $resourceType, | ||
| int | $resourceId, | ||
| string | $name, | ||
| ?string | $description | ||
| ) |
Create a new Activity Instance
| int | $activityId | ID of the activity to which the activity instance should belong |
| string | $resourceType | Resource (owner) type. One of user, group or role. |
| int | $resourceId | Resource (owner) id. ID of the model in resource type. |
| string | $name | Name of the activity instance. |
| string | null | $description | Description for the activity instance. |
Implements BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository.
Definition at line 42 of file ActivityInstanceRepository.php.
| BristolSU\Support\ActivityInstance\ActivityInstanceRepository::firstFor | ( | int | $activityId, |
| string | $resourceType, | ||
| int | $resourceId | ||
| ) |
Get the first activity instance found with the given parameters
| int | $activityId | ID of the activity to which the activity instance should belong |
| string | $resourceType | Resource (owner) type. One of user, group or role. |
| int | $resourceId | Resource (owner) id. ID of the model in resource type. |
Implements BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository.
Definition at line 22 of file ActivityInstanceRepository.php.
| BristolSU\Support\ActivityInstance\ActivityInstanceRepository::getById | ( | $id | ) |
Get an activity instance by ID
| int | $id | ID of the activity instance |
Implements BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository.
Definition at line 59 of file ActivityInstanceRepository.php.
1.8.13