interface ContentTranslationMetadataWrapperInterface (View source)

Common interface for content translation metadata wrappers.

This acts as a wrapper for an entity translation object, encapsulating the logic needed to retrieve translation metadata.

Methods

string
getSource()

Retrieves the source language for this translation.

$this
setSource(string $source)

Sets the source language for this translation.

bool
isOutdated()

Returns the translation outdated status.

$this
setOutdated(bool $outdated)

Sets the translation outdated status.

getAuthor()

Returns the translation author.

$this
setAuthor(UserInterface $account)

Sets the translation author.

bool
isPublished()

Returns the translation published status.

$this
setPublished(bool $published)

Sets the translation published status.

int
getCreatedTime()

Returns the translation creation timestamp.

$this
setCreatedTime(int $timestamp)

Sets the translation creation timestamp.

int
getChangedTime()

Returns the timestamp of the last entity change from current translation.

$this
setChangedTime(int $timestamp)

Sets the translation modification timestamp.

Details

string getSource()

Retrieves the source language for this translation.

Return Value

string

The source language code.

$this setSource(string $source)

Sets the source language for this translation.

Parameters

string $source

The source language code.

Return Value

$this

bool isOutdated()

Returns the translation outdated status.

Return Value

bool

TRUE if the translation is outdated, FALSE otherwise.

$this setOutdated(bool $outdated)

Sets the translation outdated status.

Parameters

bool $outdated

TRUE if the translation is outdated, FALSE otherwise.

Return Value

$this

UserInterface getAuthor()

Returns the translation author.

Return Value

UserInterface

The user entity for the translation author.

$this setAuthor(UserInterface $account)

Sets the translation author.

The metadata field will be updated, only if it's translatable.

Parameters

UserInterface $account

The translation author user entity.

Return Value

$this

bool isPublished()

Returns the translation published status.

Return Value

bool

TRUE if the translation is published, FALSE otherwise.

$this setPublished(bool $published)

Sets the translation published status.

The metadata field will be updated, only if it's translatable.

Parameters

bool $published

TRUE if the translation is published, FALSE otherwise.

Return Value

$this

int getCreatedTime()

Returns the translation creation timestamp.

Return Value

int

The UNIX timestamp of when the translation was created.

$this setCreatedTime(int $timestamp)

Sets the translation creation timestamp.

The metadata field will be updated, only if it's translatable.

Parameters

int $timestamp

The UNIX timestamp of when the translation was created.

Return Value

$this

int getChangedTime()

Returns the timestamp of the last entity change from current translation.

Return Value

int

The timestamp of the last entity save operation.

$this setChangedTime(int $timestamp)

Sets the translation modification timestamp.

The metadata field will be updated, only if it's translatable.

Parameters

int $timestamp

The UNIX timestamp of when the translation was last modified.

Return Value

$this