class ImageField extends Field implements FieldInterface, MediaAwareInterface, Countable, RawPersistable (View source)

Traits

TranslatableTrait

Constants

TYPE

Properties

$name from  Field

Methods

string
__toString()

No description

__call(string $key = '', array $arguments = [])

No description

from  Field
int|null
getId()

No description

from  Field
getDefinition()

No description

from  Field
void
setDefinition($name, Collection $definition)

No description

from  Field
string
getName()

No description

from  Field
setName(string $name)

No description

from  Field
get($key)

No description

from  Field
getApiValue()

No description

from  Field
array|null
getValue()

No description

getDefaultValue()

Returns the default value option

from  Field
bool
isNew()

No description

from  Field
array|mixed|null
getParsedValue()

like getValue() but returns single value for single value fields

from  Field
string|array|Markup
getTwigValue()

No description

from  Field
set(string $key, $value)

No description

from  Field
setValue($value)

No description

from  Field
int|null
getSortorder()

No description

from  Field
setSortorder(int $sortorder)

No description

from  Field
setLocale(string|null $locale)

No description

from  Field
string|null
getLocale()

No description

from  Field
int|null
getVersion()

No description

from  Field
setVersion(int|null $version)

No description

from  Field
Content|null
getContent()

No description

from  Field
setContent(Content|null $content)

No description

from  Field
bool
hasParent()

No description

from  Field
Field|null
getParent()

No description

from  Field
setParent(Field|null $parent)

No description

from  Field
setLabel(string $label)

No description

from  Field
string
getType()

No description

from  Field
bool
isContentSelect()

Used in SelectField, to distinguish between selects for "a list of items" and "select from a list of Content"

from  Field
static string
getTranslationEntityClass()

Used in TranslatableInterface, to locate the translation entity Bolt\Entity\FieldTranslation

from  Field
bool
isTranslatable()

No description

from  Field
Media|null
getLinkedMedia(MediaRepository $mediaRepository)

No description

void
setLinkedMedia(MediaRepository $mediaRepository)

No description

bool
includeAlt()

No description

int
count()

Allows {% if file is empty %} in Twig See https://twig.symfony.com/doc/3.x/tests/empty.html

Details

string __toString()

Return Value

string

__call(string $key = '', array $arguments = [])

Parameters

string $key
array $arguments

int|null getId()

Return Value

int|null

FieldType getDefinition()

Return Value

FieldType

void setDefinition($name, Collection $definition)

Parameters

$name
Collection $definition

Return Value

void

string getName()

Return Value

string

Field setName(string $name)

Parameters

string $name

Return Value

Field

get($key)

Parameters

$key

getApiValue()

array|null getValue()

Return Value

array|null

getDefaultValue()

Returns the default value option

bool isNew()

Return Value

bool

array|mixed|null getParsedValue()

like getValue() but returns single value for single value fields

Return Value

array|mixed|null

string|array|Markup getTwigValue()

Return Value

string|array|Markup

Field set(string $key, $value)

Parameters

string $key
$value

Return Value

Field

Field setValue($value)

Parameters

$value

Return Value

Field

int|null getSortorder()

Return Value

int|null

Field setSortorder(int $sortorder)

Parameters

int $sortorder

Return Value

Field

Field setLocale(string|null $locale)

Parameters

string|null $locale

Return Value

Field

string|null getLocale()

Return Value

string|null

int|null getVersion()

Return Value

int|null

Field setVersion(int|null $version)

Parameters

int|null $version

Return Value

Field

Content|null getContent()

Return Value

Content|null

Field setContent(Content|null $content)

Parameters

Content|null $content

Return Value

Field

bool hasParent()

Return Value

bool

Field|null getParent()

Return Value

Field|null

Field setParent(Field|null $parent)

Parameters

Field|null $parent

Return Value

Field

Field setLabel(string $label)

Parameters

string $label

Return Value

Field

string getType()

Return Value

string

bool isContentSelect()

Used in SelectField, to distinguish between selects for "a list of items" and "select from a list of Content"

Return Value

bool

static string getTranslationEntityClass()

Used in TranslatableInterface, to locate the translation entity Bolt\Entity\FieldTranslation

Return Value

string

bool isTranslatable()

Return Value

bool

Media|null getLinkedMedia(MediaRepository $mediaRepository)

Parameters

MediaRepository $mediaRepository

Return Value

Media|null

void setLinkedMedia(MediaRepository $mediaRepository)

Parameters

MediaRepository $mediaRepository

Return Value

void

bool includeAlt()

Return Value

bool

int count()

Allows {% if file is empty %} in Twig See https://twig.symfony.com/doc/3.x/tests/empty.html

Return Value

int