Bristol SU Support Package
Public Member Functions | List of all members
BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository Interface Reference
Inheritance diagram for BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository:
Inheritance graph
[legend]

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)
 

Detailed Description

A repository for retrieving Activity Instances

Definition at line 11 of file ActivityInstanceRepository.php.

Member Function Documentation

◆ allFor()

BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository::allFor ( int  $activityId,
string  $resourceType,
int  $resourceId 
)

Get all activity instances with the given parameters

Parameters
int$activityIdID of the activity to which the activity instances should belong
string$resourceTypeResource (owner) type. One of user, group or role.
int$resourceIdResource (owner) id. ID of the model in resource type.
Returns
Collection

Implemented in BristolSU\Support\ActivityInstance\ActivityInstanceRepository.

◆ allForActivity()

BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository::allForActivity ( int  $activityId)

Get all activity instances belonging to an activity

Parameters
int$activityIdID Of the activity
Returns
Collection

Implemented in BristolSU\Support\ActivityInstance\ActivityInstanceRepository.

◆ create()

BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository::create ( int  $activityId,
string  $resourceType,
int  $resourceId,
string  $name,
?string  $description 
)

Create a new Activity Instance

Parameters
int$activityIdID of the activity to which the activity instance should belong
string$resourceTypeResource (owner) type. One of user, group or role.
int$resourceIdResource (owner) id. ID of the model in resource type.
string$nameName of the activity instance.
string | null$descriptionDescription for the activity instance.
Returns
ActivityInstance

Implemented in BristolSU\Support\ActivityInstance\ActivityInstanceRepository.

◆ firstFor()

BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository::firstFor ( int  $activityId,
string  $resourceType,
int  $resourceId 
)

Get the first activity instance found with the given parameters

Parameters
int$activityIdID of the activity to which the activity instance should belong
string$resourceTypeResource (owner) type. One of user, group or role.
int$resourceIdResource (owner) id. ID of the model in resource type.
Returns
ActivityInstance

Implemented in BristolSU\Support\ActivityInstance\ActivityInstanceRepository.

◆ getById()

BristolSU\Support\ActivityInstance\Contracts\ActivityInstanceRepository::getById (   $id)

Get an activity instance by ID

Parameters
int$idID of the activity instance
Returns
ActivityInstance

Implemented in BristolSU\Support\ActivityInstance\ActivityInstanceRepository.


The documentation for this interface was generated from the following file: