public ContentTranslationMetadataWrapper::setChangedTime($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
Overrides ContentTranslationMetadataWrapperInterface::setChangedTime
File
- core/modules/content_translation/src/ContentTranslationMetadataWrapper.php, line 130
Class
- ContentTranslationMetadataWrapper
- Base class for content translation metadata wrappers.
Namespace
Drupal\content_translation
Code
1 2 3 4 5 | public function setChangedTime( $timestamp ) { $field_name = $this ->translation->hasField( 'content_translation_changed' ) ? 'content_translation_changed' : 'changed' ; $this ->setFieldOnlyIfTranslatable( $field_name , $timestamp ); return $this ; } |
Please login to continue.