FileAccess Orion

Images

Trait Images

Exposes some asset related functions supporting reusable code

Table of Contents

AssignImage()  : Result
Assign an image from instance
GetPrimaryPicture()  : Asset|null
Get the primary picture
Images()  : array<string|int, mixed>|array<string|int, Asset>
List images
MainImage()  : Asset|null
Get main image

Methods

AssignImage()

Assign an image from instance

public AssignImage(Asset $asset) : Result
Parameters
$asset : Asset

An asset instance

Return values
Result

The result object

GetPrimaryPicture()

Get the primary picture

public GetPrimaryPicture() : Asset|null
Return values
Asset|null

Images()

List images

public Images([bool $resolved = false ]) : array<string|int, mixed>|array<string|int, Asset>

Get the content of the images attribute relation Will generate and return an empty array hen attribute is not filled

Parameters
$resolved : bool = false
Return values
array<string|int, mixed>|array<string|int, Asset>

MainImage()

Get main image

public MainImage() : Asset|null
Return values
Asset|null

Search results