Heratio Framework API Reference

HeroImageRepository
in package

Hero Image Repository.

Provides database access for heritage_hero_slide table. Manages hero background images/slides for landing page.

Table of Contents

Methods

count()  : int
Count images.
create()  : int
Create hero image.
delete()  : bool
Delete hero image.
findById()  : object|null
Get image by ID.
getAllImages()  : Collection
Get all images (for admin).
getEnabledImages()  : Collection
Get enabled hero images for institution.
reorder()  : void
Reorder images.
update()  : bool
Update hero image.

Methods

count()

Count images.

public count([int|null $institutionId = null ][, bool $enabledOnly = true ]) : int
Parameters
$institutionId : int|null = null
$enabledOnly : bool = true
Return values
int

create()

Create hero image.

public create(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

delete()

Delete hero image.

public delete(int $id) : bool
Parameters
$id : int
Return values
bool

findById()

Get image by ID.

public findById(int $id) : object|null
Parameters
$id : int
Return values
object|null

getAllImages()

Get all images (for admin).

public getAllImages([int|null $institutionId = null ]) : Collection
Parameters
$institutionId : int|null = null
Return values
Collection

getEnabledImages()

Get enabled hero images for institution.

public getEnabledImages([int|null $institutionId = null ]) : Collection

Filters by scheduling dates if set.

Parameters
$institutionId : int|null = null
Return values
Collection

reorder()

Reorder images.

public reorder(array<string|int, mixed> $imageOrders) : void
Parameters
$imageOrders : array<string|int, mixed>

update()

Update hero image.

public update(int $id, array<string|int, mixed> $data) : bool
Parameters
$id : int
$data : array<string|int, mixed>
Return values
bool

        
On this page

Search results