class GalleryAdapter extends Adapter implements AdapterInterface

Base Gallery adapter. The Gallery adapter provides the placeholder attachment type for gallery containers.

Methods

static mixed
adapterFor(array $file, string $path)

Locate the first adapter that's able to handle a file.

from Adapter
static boolean
canHandle(array $file, string $temp_path)

Gallery adapter will always return false.

__construct($file = null, $temp_path = null)

No description

string
getType()

Adapter type

mixed
getDimensions()

Get the original file dimensions, if possible.

string
toImage(array $size = array(), string $path = false)

Convert to preview image

string
previewUrl($attachment)

Override previewUrl method Return container's first child preview URL

string
originalUrl($attachment)

Override originalUrl method Return container's first child original URL

Details

in Adapter at line line 28
static mixed adapterFor(array $file, string $path)

Locate the first adapter that's able to handle a file.

Each adapter determines its ability to handle a particular file

Parameters

array $file JSON file information
string $path Temp file path

Return Value

mixed Adapter instance if found, false otherwise

at line line 24
static boolean canHandle(array $file, string $temp_path)

Gallery adapter will always return false.

Parameters

array $file File info
string $temp_path temporary path

Return Value

boolean

at line line 29
__construct($file = null, $temp_path = null)

Parameters

$file
$temp_path

at line line 37
string getType()

Adapter type

Return Value

string Type

at line line 50
mixed getDimensions()

Get the original file dimensions, if possible.

Returns NULL otherwise

Return Value

mixed

at line line 61
string toImage(array $size = array(), string $path = false)

Convert to preview image

Parameters

array $size Contains width, height keys
string $path Path to source file

Return Value

string Path to sized file

at line line 71
string previewUrl($attachment)

Override previewUrl method Return container's first child preview URL

Parameters

$attachment

Return Value

string

at line line 116
string originalUrl($attachment)

Override originalUrl method Return container's first child original URL

Parameters

$attachment

Return Value

string