Craft Themes (3.x)

AssetRenderFile extends FieldDisplayer
in package
implements FileFieldDisplayerInterface

Renders the file of an asset field

Interfaces, Classes and Traits

FileFieldDisplayerInterface
Interface for field displayers that render files (Assets, user photo etc)

Table of Contents

$handle  : mixed
$_field  : Field
$_options  : Model
afterValidate()  : mixed
beforeRender()  : bool
Callback before rendering, returning false will skip the field rendering.
eagerLoad()  : array<string|int, mixed>
fields()  : mixed
getAllowedFileKinds()  : array<string|int, mixed>
Get available file kinds
getCanBeCached()  : bool
getDescription()  : string
getDisplayerForKind()  : FileDisplayerInterface|null
getErrors()  : mixed
getField()  : FieldInterface
getFieldTargets()  : array<string|int, mixed>
getHandle()  : string
getHasOptions()  : bool
getLimit()  : int
Get field limit
getName()  : string
getOptions()  : FieldDisplayerOptions
Get options
getTheme()  : ThemeInterface
Theme getter
hasErrors()  : mixed
isDefault()  : bool
Is this displayer the default for a field class
setField()  : mixed
Field setter
setOptions()  : mixed
Options setter
getOptionsModel()  : string
Get options model class

Properties

$handle

public static mixed $handle = 'asset-renderfile'
Tags
inheritDoc

Methods

afterValidate()

public afterValidate() : mixed
Tags
inheritDoc
Return values
mixed

beforeRender()

Callback before rendering, returning false will skip the field rendering.

public beforeRender(mixed &$value) : bool
Parameters
$value : mixed
Tags
inheritDoc
Return values
bool

eagerLoad()

public eagerLoad(array<string|int, mixed> $eagerLoad[, string $prefix = '' ], int $level) : array<string|int, mixed>
Parameters
$eagerLoad : array<string|int, mixed>
$prefix : string = ''
$level : int
Tags
inheritDoc
Return values
array<string|int, mixed>

fields()

public fields() : mixed
Tags
inheritDoc
Return values
mixed

getAllowedFileKinds()

Get available file kinds

public getAllowedFileKinds() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCanBeCached()

public getCanBeCached() : bool
Tags
inheritDoc
Return values
bool

getDescription()

public getDescription() : string
Tags
inheritDoc
Return values
string

getErrors()

public getErrors([mixed $attribute = null ]) : mixed
Parameters
$attribute : mixed = null
Tags
inheritDoc
Return values
mixed

getFieldTargets()

public static getFieldTargets() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getHandle()

public static getHandle() : string
Tags
inheritDoc
Return values
string

getHasOptions()

public getHasOptions() : bool
Tags
inheritDoc
Return values
bool

getLimit()

Get field limit

public getLimit() : int
Return values
int

getName()

public getName() : string
Tags
inheritDoc
Return values
string

hasErrors()

public hasErrors([mixed $attribute = null ]) : mixed
Parameters
$attribute : mixed = null
Tags
inheritDoc
Return values
mixed

isDefault()

Is this displayer the default for a field class

public static isDefault(string $fieldClass) : bool
Parameters
$fieldClass : string
Tags
inheritDoc
Return values
bool

setOptions()

Options setter

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Tags
inheritDoc
Return values
mixed

getOptionsModel()

Get options model class

protected getOptionsModel() : string
Tags
inheritDoc
Return values
string

Search results